diff --git a/modules/cert.cpp b/modules/cert.cpp index 7584068a..d8549e24 100644 --- a/modules/cert.cpp +++ b/modules/cert.cpp @@ -79,7 +79,8 @@ class CCertMod : public CModule { } else if (sPageName == "update") { CFile fPemFile(PemFile()); - if (fPemFile.Open(O_WRONLY | O_TRUNC | O_CREAT)) { + if (WebSock.IsPost() && + fPemFile.Open(O_WRONLY | O_TRUNC | O_CREAT)) { fPemFile.Write(WebSock.GetParam("cert", true, "")); fPemFile.Close(); } @@ -87,7 +88,9 @@ class CCertMod : public CModule { WebSock.Redirect(GetWebPath()); return true; } else if (sPageName == "delete") { - CFile::Delete(PemFile()); + if (WebSock.IsPost()) { + CFile::Delete(PemFile()); + } WebSock.Redirect(GetWebPath()); return true; } diff --git a/modules/certauth.cpp b/modules/certauth.cpp index e8756575..6fb3bc75 100644 --- a/modules/certauth.cpp +++ b/modules/certauth.cpp @@ -375,7 +375,9 @@ class CSSLClientCertMod : public CModule { WebSock.Redirect(GetWebPath()); return true; } else if (sPageName == "delete") { - DelKey(*pUser, WebSock.GetParam("key", false)); + if (WebSock.IsPost()) { + DelKey(*pUser, WebSock.GetParam("key")); + } WebSock.Redirect(GetWebPath()); return true; } diff --git a/modules/data/cert/tmpl/index.tmpl b/modules/data/cert/tmpl/index.tmpl index d3a12cee..cd5d18cb 100644 --- a/modules/data/cert/tmpl/index.tmpl +++ b/modules/data/cert/tmpl/index.tmpl @@ -2,7 +2,10 @@ INC Header.tmpl ?> IF Cert ?> - SETBLOCK DELLINK ?> FORMAT "here" "TRANSLATORS: this text is inserted into `click here` in the other string"?> ENDSETBLOCK ?> +
+ SETBLOCK DELLINK ?>" /> ENDSETBLOCK ?>FORMAT "You already have a certificate set, use the form below to overwrite the current certificate. Alternatively click {1} to delete your certificate." "DELLINK ESC=" "TRANSLATORS: {1} is `here`, translateable in the other string" ?>
ELSE ?>FORMAT "You do not have a certificate yet." ?>
diff --git a/modules/data/certauth/tmpl/index.tmpl b/modules/data/certauth/tmpl/index.tmpl index 3b0d69ab..815c2871 100644 --- a/modules/data/certauth/tmpl/index.tmpl +++ b/modules/data/certauth/tmpl/index.tmpl @@ -33,7 +33,11 @@ LOOP KeyLoop ?>
" />