Fossil SCM

Make "off" the preferred way to diable robot-restrict

drh 2025-08-19 10:37 trunk
Commit db69c47abda94b61ea5df13633d3d69348f3bf43fdc5f55e09d81d6a7ccc2d8d
2 files changed +5 -2 +1 -1
+5 -2
--- src/robot.c
+++ src/robot.c
@@ -156,11 +156,11 @@
156156
** also covers /tarball and /sqlar. If a tag has an "X" character appended,
157157
** then it only applies if query parameters are such that the page is
158158
** particularly difficult to compute. In all other case, the tag should
159159
** exactly match the page name.
160160
**
161
-** Make this setting "none" or "off" to disable all robot restrictions.
161
+** Change this setting "off" to disable all robot restrictions.
162162
*/
163163
164164
/*
165165
** Return the default restriction GLOB
166166
*/
@@ -182,11 +182,14 @@
182182
const char *zToken;
183183
static int bKnownPass = 0;
184184
if( g.zLogin ) return 0; /* Logged in users always get through */
185185
if( bKnownPass ) return 0; /* Already known to pass robot restrictions */
186186
zGlob = db_get("robot-restrict",robot_restrict_default());
187
- if( zGlob==0 || zGlob[0]==0 ){ bKnownPass = 1; return 0; }
187
+ if( zGlob==0 || zGlob[0]==0 || fossil_strcmp(zGlob, "off")==0 ){
188
+ bKnownPass = 1;
189
+ return 0; /* Robot restriction is turned off */
190
+ }
188191
if( !glob_multi_match(zGlob, zPage) ) return 0;
189192
zToken = P("token");
190193
if( zToken!=0
191194
&& db_exists("SELECT 1 FROM config"
192195
" WHERE name='token-%q'"
193196
--- src/robot.c
+++ src/robot.c
@@ -156,11 +156,11 @@
156 ** also covers /tarball and /sqlar. If a tag has an "X" character appended,
157 ** then it only applies if query parameters are such that the page is
158 ** particularly difficult to compute. In all other case, the tag should
159 ** exactly match the page name.
160 **
161 ** Make this setting "none" or "off" to disable all robot restrictions.
162 */
163
164 /*
165 ** Return the default restriction GLOB
166 */
@@ -182,11 +182,14 @@
182 const char *zToken;
183 static int bKnownPass = 0;
184 if( g.zLogin ) return 0; /* Logged in users always get through */
185 if( bKnownPass ) return 0; /* Already known to pass robot restrictions */
186 zGlob = db_get("robot-restrict",robot_restrict_default());
187 if( zGlob==0 || zGlob[0]==0 ){ bKnownPass = 1; return 0; }
 
 
 
188 if( !glob_multi_match(zGlob, zPage) ) return 0;
189 zToken = P("token");
190 if( zToken!=0
191 && db_exists("SELECT 1 FROM config"
192 " WHERE name='token-%q'"
193
--- src/robot.c
+++ src/robot.c
@@ -156,11 +156,11 @@
156 ** also covers /tarball and /sqlar. If a tag has an "X" character appended,
157 ** then it only applies if query parameters are such that the page is
158 ** particularly difficult to compute. In all other case, the tag should
159 ** exactly match the page name.
160 **
161 ** Change this setting "off" to disable all robot restrictions.
162 */
163
164 /*
165 ** Return the default restriction GLOB
166 */
@@ -182,11 +182,14 @@
182 const char *zToken;
183 static int bKnownPass = 0;
184 if( g.zLogin ) return 0; /* Logged in users always get through */
185 if( bKnownPass ) return 0; /* Already known to pass robot restrictions */
186 zGlob = db_get("robot-restrict",robot_restrict_default());
187 if( zGlob==0 || zGlob[0]==0 || fossil_strcmp(zGlob, "off")==0 ){
188 bKnownPass = 1;
189 return 0; /* Robot restriction is turned off */
190 }
191 if( !glob_multi_match(zGlob, zPage) ) return 0;
192 zToken = P("token");
193 if( zToken!=0
194 && db_exists("SELECT 1 FROM config"
195 " WHERE name='token-%q'"
196
+1 -1
--- src/setup.c
+++ src/setup.c
@@ -511,11 +511,11 @@
511511
@ /praise. The "zip" covers itself and also /tarball and /sqlar. If a
512512
@ tag has an "X" character appended, then it only applies if query
513513
@ parameters are such that the page is particularly difficult to compute.
514514
@ In all other case, the tag should exactly match the page name.
515515
@
516
- @ To disable robot restrictions, make this setting "none" or "off".
516
+ @ To disable robot restrictions, change this setting to "off".
517517
@ (Property: robot-restrict)
518518
@ <br>
519519
textarea_attribute("", 2, 80,
520520
"robot-restrict", "rbrestrict", robot_restrict_default(), 0);
521521
522522
--- src/setup.c
+++ src/setup.c
@@ -511,11 +511,11 @@
511 @ /praise. The "zip" covers itself and also /tarball and /sqlar. If a
512 @ tag has an "X" character appended, then it only applies if query
513 @ parameters are such that the page is particularly difficult to compute.
514 @ In all other case, the tag should exactly match the page name.
515 @
516 @ To disable robot restrictions, make this setting "none" or "off".
517 @ (Property: robot-restrict)
518 @ <br>
519 textarea_attribute("", 2, 80,
520 "robot-restrict", "rbrestrict", robot_restrict_default(), 0);
521
522
--- src/setup.c
+++ src/setup.c
@@ -511,11 +511,11 @@
511 @ /praise. The "zip" covers itself and also /tarball and /sqlar. If a
512 @ tag has an "X" character appended, then it only applies if query
513 @ parameters are such that the page is particularly difficult to compute.
514 @ In all other case, the tag should exactly match the page name.
515 @
516 @ To disable robot restrictions, change this setting to "off".
517 @ (Property: robot-restrict)
518 @ <br>
519 textarea_attribute("", 2, 80,
520 "robot-restrict", "rbrestrict", robot_restrict_default(), 0);
521
522

Keyboard Shortcuts

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