Fossil SCM

In cgi_same_origin(), read REQUEST_METHOD, not REQUST_METHOD, so that a POST from another origin is written to the error log.

dmestas 2026-11-18 20:00 UTC small-fixes
Commit 932a61d43875cf762812a62ca143b32eb6d9ab23e841c1c8e08138c97d352efd
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -722,11 +722,11 @@
722722
}else if( zRef[nBase]!=0 && zRef[nBase]!='/' ){
723723
rc = 0;
724724
}else{
725725
rc = 1;
726726
}
727
- if( rc==0 && bErrorLog && fossil_strcmp(P("REQUST_METHOD"),"POST")==0 ){
727
+ if( rc==0 && bErrorLog && fossil_strcmp(P("REQUEST_METHOD"),"POST")==0 ){
728728
fossil_errorlog("warning: POST from different origin");
729729
}
730730
fossil_free(zToFree);
731731
return rc;
732732
}
733733
--- src/cgi.c
+++ src/cgi.c
@@ -722,11 +722,11 @@
722 }else if( zRef[nBase]!=0 && zRef[nBase]!='/' ){
723 rc = 0;
724 }else{
725 rc = 1;
726 }
727 if( rc==0 && bErrorLog && fossil_strcmp(P("REQUST_METHOD"),"POST")==0 ){
728 fossil_errorlog("warning: POST from different origin");
729 }
730 fossil_free(zToFree);
731 return rc;
732 }
733
--- src/cgi.c
+++ src/cgi.c
@@ -722,11 +722,11 @@
722 }else if( zRef[nBase]!=0 && zRef[nBase]!='/' ){
723 rc = 0;
724 }else{
725 rc = 1;
726 }
727 if( rc==0 && bErrorLog && fossil_strcmp(P("REQUEST_METHOD"),"POST")==0 ){
728 fossil_errorlog("warning: POST from different origin");
729 }
730 fossil_free(zToFree);
731 return rc;
732 }
733

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button