Fossil SCM

Fix a bug in the spider excluder.

drh 2016-05-31 01:57 trunk
Commit 8583ca38eb285560e1e7d64094c5b0bdb5b4b5b1
2 files changed +1 -1 +1 -1
+1 -1
--- src/captcha.c
+++ src/captcha.c
@@ -600,11 +600,11 @@
600600
return 0;
601601
}
602602
603603
/* This appears to be a spider. Offer the captcha */
604604
style_header("Verification");
605
- form_begin(0, "%s", g.zPath);
605
+ @ <form method='POST' action='%s(g.zPath)'>
606606
cgi_query_parameters_to_hidden();
607607
@ <p>Please demonstrate that you are human, not a spider or robot</p>
608608
captcha_generate(1);
609609
@ </form>
610610
style_footer();
611611
--- src/captcha.c
+++ src/captcha.c
@@ -600,11 +600,11 @@
600 return 0;
601 }
602
603 /* This appears to be a spider. Offer the captcha */
604 style_header("Verification");
605 form_begin(0, "%s", g.zPath);
606 cgi_query_parameters_to_hidden();
607 @ <p>Please demonstrate that you are human, not a spider or robot</p>
608 captcha_generate(1);
609 @ </form>
610 style_footer();
611
--- src/captcha.c
+++ src/captcha.c
@@ -600,11 +600,11 @@
600 return 0;
601 }
602
603 /* This appears to be a spider. Offer the captcha */
604 style_header("Verification");
605 @ <form method='POST' action='%s(g.zPath)'>
606 cgi_query_parameters_to_hidden();
607 @ <p>Please demonstrate that you are human, not a spider or robot</p>
608 captcha_generate(1);
609 @ </form>
610 style_footer();
611
+1 -1
--- src/style.c
+++ src/style.c
@@ -201,11 +201,11 @@
201201
}
202202
for(i=0; i<nFormAction; i++){
203203
@ gebi("form%d(i+1)").action="%s(aFormAction[i])";
204204
}
205205
@ }
206
- if( sqlite3_strglob("*Opera Mini/[1-9]*", P("HTTP_USER_AGENT"))==0 ){
206
+ if( sqlite3_strglob("*Opera Mini/[1-9]*", PD("HTTP_USER_AGENT",""))==0 ){
207207
/* Special case for Opera Mini, which executes JS server-side */
208208
@ var isOperaMini = Object.prototype.toString.call(window.operamini)
209209
@ === "[object OperaMini]";
210210
@ if( isOperaMini ){
211211
@ setTimeout("setAllHrefs();",%d(nDelay));
212212
--- src/style.c
+++ src/style.c
@@ -201,11 +201,11 @@
201 }
202 for(i=0; i<nFormAction; i++){
203 @ gebi("form%d(i+1)").action="%s(aFormAction[i])";
204 }
205 @ }
206 if( sqlite3_strglob("*Opera Mini/[1-9]*", P("HTTP_USER_AGENT"))==0 ){
207 /* Special case for Opera Mini, which executes JS server-side */
208 @ var isOperaMini = Object.prototype.toString.call(window.operamini)
209 @ === "[object OperaMini]";
210 @ if( isOperaMini ){
211 @ setTimeout("setAllHrefs();",%d(nDelay));
212
--- src/style.c
+++ src/style.c
@@ -201,11 +201,11 @@
201 }
202 for(i=0; i<nFormAction; i++){
203 @ gebi("form%d(i+1)").action="%s(aFormAction[i])";
204 }
205 @ }
206 if( sqlite3_strglob("*Opera Mini/[1-9]*", PD("HTTP_USER_AGENT",""))==0 ){
207 /* Special case for Opera Mini, which executes JS server-side */
208 @ var isOperaMini = Object.prototype.toString.call(window.operamini)
209 @ === "[object OperaMini]";
210 @ if( isOperaMini ){
211 @ setTimeout("setAllHrefs();",%d(nDelay));
212

Keyboard Shortcuts

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