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