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.
Commit
dfe9fb28251f50c0c44fc38493506589a533f9ca98c1180a0a3809c322d2b54f
Parent
9444ac0064e195e…
1 file changed
+6
+6
| --- src/robot.c | ||
| +++ src/robot.c | ||
| @@ -139,10 +139,16 @@ | ||
| 139 | 139 | /* Only do this computation once, then cache the results for future |
| 140 | 140 | ** use */ |
| 141 | 141 | if( robot.resultCache ){ |
| 142 | 142 | return robot.resultCache==MIGHT_BE_ROBOT; |
| 143 | 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 | + } | |
| 144 | 150 | |
| 145 | 151 | /* Condition 1: Is there a valid login? |
| 146 | 152 | */ |
| 147 | 153 | if( g.userUid==0 ){ |
| 148 | 154 | login_check_credentials(); |
| 149 | 155 |
| --- 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 |