web: only delete channels, notes, keys and certs on POST
This commit is contained in:
1 parent
9962274521
commit
8dc96ae08c
9 files changed
+124
-10
No files matched your search
+5
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user