Allow only POST to post
This commit is contained in:
parent
27109f25ac
commit
8822fb6f20
@ -67,7 +67,8 @@ int
|
||||
cgiMain()
|
||||
{
|
||||
char *message;
|
||||
if (cgiFormSubmitClicked("login") == cgiFormSuccess) {
|
||||
if (cgiFormSubmitClicked("login") == cgiFormSuccess &&
|
||||
!strcmp(cgiRequestMethod, "POST")) {
|
||||
message = validate_credentials();
|
||||
} else {
|
||||
message = "";
|
||||
|
@ -238,7 +238,8 @@ cgiMain()
|
||||
|
||||
fprintf(cgiOut, "<body>\n");
|
||||
|
||||
if (cgiFormSubmitClicked("submit") == cgiFormSuccess) {
|
||||
if (cgiFormSubmitClicked("submit") == cgiFormSuccess &&
|
||||
!strcmp(cgiRequestMethod, "POST")) {
|
||||
handle_submitted_comment();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user