Fossil SCM

In client_might_be_a_robot(), report a command run from the command line as not a robot. Outside an HTTP request the robot check sent its Browser Verification page with cgi_reply(), which has no output there: "fossil test-th-eval" of styleHeader crashed. Reported by Dan Shearer.

dmestas 2026-11-20 15:24 UTC small-fixes
Commit dfe9fb28251f50c0c44fc38493506589a533f9ca98c1180a0a3809c322d2b54f
1 file changed +6
--- src/robot.c
+++ src/robot.c
@@ -139,10 +139,16 @@
139139
/* Only do this computation once, then cache the results for future
140140
** use */
141141
if( robot.resultCache ){
142142
return robot.resultCache==MIGHT_BE_ROBOT;
143143
}
144
+
145
+ /* A command run from the command line has no web client. */
146
+ if( !g.isHTTP ){
147
+ robot.resultCache = KNOWN_NOT_ROBOT;
148
+ return 0;
149
+ }
144150
145151
/* Condition 1: Is there a valid login?
146152
*/
147153
if( g.userUid==0 ){
148154
login_check_credentials();
149155
--- src/robot.c
+++ src/robot.c
@@ -139,10 +139,16 @@
139 /* Only do this computation once, then cache the results for future
140 ** use */
141 if( robot.resultCache ){
142 return robot.resultCache==MIGHT_BE_ROBOT;
143 }
 
 
 
 
 
 
144
145 /* Condition 1: Is there a valid login?
146 */
147 if( g.userUid==0 ){
148 login_check_credentials();
149
--- src/robot.c
+++ src/robot.c
@@ -139,10 +139,16 @@
139 /* Only do this computation once, then cache the results for future
140 ** use */
141 if( robot.resultCache ){
142 return robot.resultCache==MIGHT_BE_ROBOT;
143 }
144
145 /* A command run from the command line has no web client. */
146 if( !g.isHTTP ){
147 robot.resultCache = KNOWN_NOT_ROBOT;
148 return 0;
149 }
150
151 /* Condition 1: Is there a valid login?
152 */
153 if( g.userUid==0 ){
154 login_check_credentials();
155

Keyboard Shortcuts

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