Fossil SCM

Open up access to /test-robotck to all users. Clear the "Press OK to continue" from the screen when the Ok button is pressed, so that it does not linger for zip and tarball downloads.

drh 2025-08-16 14:20 trunk
Commit 508d3cd98aa1c0754ce2fc925e4db78b73cdd40e4c180f6e7573db3b7c09bb3a
1 file changed +3 -2
+3 -2
--- src/robot.c
+++ src/robot.c
@@ -88,11 +88,11 @@
8888
/* Ask the client to present proof-of-work */
8989
cgi_reset_content();
9090
cgi_set_content_type("text/html");
9191
style_header("Browser Verification");
9292
@ <h1 id="x1">Checking to see if you are a robot<span id="x2"></span></h1>
93
- @ <form method="GET">
93
+ @ <form method="GET" id="x6">
9494
@ <p id="x3" style="visibility:hidden;">\
9595
@ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
9696
cgi_query_parameters_to_hidden();
9797
@ <input id="x4" type="hidden" name="proof" value="0">
9898
@ </form>
@@ -107,10 +107,11 @@
107107
@ setTimeout(bbb,1,h+a,a-1);
108108
@ }else{
109109
@ aaa("x3").style.visibility="visible";
110110
@ aaa("x2").textContent="";
111111
@ aaa("x1").textContent="All clear";
112
+ @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
112113
@ aaa("x5").focus();
113114
@ }
114115
@ }
115116
k = 800 + h2%99;
116117
h2 = (k*k + k)/2;
@@ -190,11 +191,11 @@
190191
const char *zP1 = P("proof");
191192
const char *zP2 = P(POW_COOKIE);
192193
const char *z;
193194
if( zName==0 || zName[0]==0 ) zName = g.zPath;
194195
login_check_credentials();
195
- if( !g.perm.Admin ){ login_needed(0); return; }
196
+ if( g.zLogin==0 ){ login_needed(1); return; }
196197
g.zLogin = 0;
197198
if( robot_restrict(zName) ) return;
198199
style_set_current_feature("test");
199200
style_header("robot_restrict() test");
200201
@ <h1>Captcha passed</h1>
201202
--- src/robot.c
+++ src/robot.c
@@ -88,11 +88,11 @@
88 /* Ask the client to present proof-of-work */
89 cgi_reset_content();
90 cgi_set_content_type("text/html");
91 style_header("Browser Verification");
92 @ <h1 id="x1">Checking to see if you are a robot<span id="x2"></span></h1>
93 @ <form method="GET">
94 @ <p id="x3" style="visibility:hidden;">\
95 @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
96 cgi_query_parameters_to_hidden();
97 @ <input id="x4" type="hidden" name="proof" value="0">
98 @ </form>
@@ -107,10 +107,11 @@
107 @ setTimeout(bbb,1,h+a,a-1);
108 @ }else{
109 @ aaa("x3").style.visibility="visible";
110 @ aaa("x2").textContent="";
111 @ aaa("x1").textContent="All clear";
 
112 @ aaa("x5").focus();
113 @ }
114 @ }
115 k = 800 + h2%99;
116 h2 = (k*k + k)/2;
@@ -190,11 +191,11 @@
190 const char *zP1 = P("proof");
191 const char *zP2 = P(POW_COOKIE);
192 const char *z;
193 if( zName==0 || zName[0]==0 ) zName = g.zPath;
194 login_check_credentials();
195 if( !g.perm.Admin ){ login_needed(0); return; }
196 g.zLogin = 0;
197 if( robot_restrict(zName) ) return;
198 style_set_current_feature("test");
199 style_header("robot_restrict() test");
200 @ <h1>Captcha passed</h1>
201
--- src/robot.c
+++ src/robot.c
@@ -88,11 +88,11 @@
88 /* Ask the client to present proof-of-work */
89 cgi_reset_content();
90 cgi_set_content_type("text/html");
91 style_header("Browser Verification");
92 @ <h1 id="x1">Checking to see if you are a robot<span id="x2"></span></h1>
93 @ <form method="GET" id="x6">
94 @ <p id="x3" style="visibility:hidden;">\
95 @ Press <input type="submit" id="x5" value="Ok" focus> to continue</p>
96 cgi_query_parameters_to_hidden();
97 @ <input id="x4" type="hidden" name="proof" value="0">
98 @ </form>
@@ -107,10 +107,11 @@
107 @ setTimeout(bbb,1,h+a,a-1);
108 @ }else{
109 @ aaa("x3").style.visibility="visible";
110 @ aaa("x2").textContent="";
111 @ aaa("x1").textContent="All clear";
112 @ aaa("x6").onsubmit=function(){aaa("x3").style.visibility="hidden";};
113 @ aaa("x5").focus();
114 @ }
115 @ }
116 k = 800 + h2%99;
117 h2 = (k*k + k)/2;
@@ -190,11 +191,11 @@
191 const char *zP1 = P("proof");
192 const char *zP2 = P(POW_COOKIE);
193 const char *z;
194 if( zName==0 || zName[0]==0 ) zName = g.zPath;
195 login_check_credentials();
196 if( g.zLogin==0 ){ login_needed(1); return; }
197 g.zLogin = 0;
198 if( robot_restrict(zName) ) return;
199 style_set_current_feature("test");
200 style_header("robot_restrict() test");
201 @ <h1>Captcha passed</h1>
202

Keyboard Shortcuts

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