Fossil SCM

Improvements to robot-restrict.

drh 2025-08-19 18:54 trunk
Commit 4e73f314739095fe3aff4bd02d7510c578818b6b160177b2c909c0d298db0d28
2 files changed +2 -2 +1
+2 -2
--- src/robot.c
+++ src/robot.c
@@ -252,11 +252,11 @@
252252
** The VALUE of this setting is a list of GLOB patterns that match
253253
** pages for which complex HTTP requests from unauthenicated clients
254254
** should be disallowed. "Unauthenticated" means the user is "nobody".
255255
** The recommended value for this setting is:
256256
**
257
-** timelineX,diff,annotate,zip,fileage,file
257
+** timelineX,diff,annotate,zip,fileage,file,finfo
258258
**
259259
** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
260260
** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
261261
** also covers /tarball and /sqlar. If a tag has an "X" character appended,
262262
** then it only applies if query parameters are such that the page is
@@ -268,11 +268,11 @@
268268
269269
/*
270270
** Return the default restriction GLOB
271271
*/
272272
const char *robot_restrict_default(void){
273
- return "timelineX,diff,annotate,zip,fileage,file";
273
+ return "timelineX,diff,annotate,zip,fileage,file,finfo";
274274
}
275275
276276
/*
277277
** Return true if zTag matches one of the tags in the robot-restrict
278278
** setting.
279279
--- src/robot.c
+++ src/robot.c
@@ -252,11 +252,11 @@
252 ** The VALUE of this setting is a list of GLOB patterns that match
253 ** pages for which complex HTTP requests from unauthenicated clients
254 ** should be disallowed. "Unauthenticated" means the user is "nobody".
255 ** The recommended value for this setting is:
256 **
257 ** timelineX,diff,annotate,zip,fileage,file
258 **
259 ** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
260 ** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
261 ** also covers /tarball and /sqlar. If a tag has an "X" character appended,
262 ** then it only applies if query parameters are such that the page is
@@ -268,11 +268,11 @@
268
269 /*
270 ** Return the default restriction GLOB
271 */
272 const char *robot_restrict_default(void){
273 return "timelineX,diff,annotate,zip,fileage,file";
274 }
275
276 /*
277 ** Return true if zTag matches one of the tags in the robot-restrict
278 ** setting.
279
--- src/robot.c
+++ src/robot.c
@@ -252,11 +252,11 @@
252 ** The VALUE of this setting is a list of GLOB patterns that match
253 ** pages for which complex HTTP requests from unauthenicated clients
254 ** should be disallowed. "Unauthenticated" means the user is "nobody".
255 ** The recommended value for this setting is:
256 **
257 ** timelineX,diff,annotate,zip,fileage,file,finfo
258 **
259 ** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
260 ** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
261 ** also covers /tarball and /sqlar. If a tag has an "X" character appended,
262 ** then it only applies if query parameters are such that the page is
@@ -268,11 +268,11 @@
268
269 /*
270 ** Return the default restriction GLOB
271 */
272 const char *robot_restrict_default(void){
273 return "timelineX,diff,annotate,zip,fileage,file,finfo";
274 }
275
276 /*
277 ** Return true if zTag matches one of the tags in the robot-restrict
278 ** setting.
279
--- src/timeline.c
+++ src/timeline.c
@@ -1970,10 +1970,11 @@
19701970
}
19711971
if( showSql ) db_append_dml_to_blob(&allSql);
19721972
if( zUses!=0 ){
19731973
int ufid = db_int(0, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUses);
19741974
if( ufid ){
1975
+ if( robot_restrict("timelineX") ) return;
19751976
zUses = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ufid);
19761977
db_multi_exec("CREATE TEMP TABLE usesfile(rid INTEGER PRIMARY KEY)");
19771978
compute_uses_file("usesfile", ufid, 0);
19781979
zType = "ci";
19791980
disableY = 1;
19801981
--- src/timeline.c
+++ src/timeline.c
@@ -1970,10 +1970,11 @@
1970 }
1971 if( showSql ) db_append_dml_to_blob(&allSql);
1972 if( zUses!=0 ){
1973 int ufid = db_int(0, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUses);
1974 if( ufid ){
 
1975 zUses = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ufid);
1976 db_multi_exec("CREATE TEMP TABLE usesfile(rid INTEGER PRIMARY KEY)");
1977 compute_uses_file("usesfile", ufid, 0);
1978 zType = "ci";
1979 disableY = 1;
1980
--- src/timeline.c
+++ src/timeline.c
@@ -1970,10 +1970,11 @@
1970 }
1971 if( showSql ) db_append_dml_to_blob(&allSql);
1972 if( zUses!=0 ){
1973 int ufid = db_int(0, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUses);
1974 if( ufid ){
1975 if( robot_restrict("timelineX") ) return;
1976 zUses = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ufid);
1977 db_multi_exec("CREATE TEMP TABLE usesfile(rid INTEGER PRIMARY KEY)");
1978 compute_uses_file("usesfile", ufid, 0);
1979 zType = "ci";
1980 disableY = 1;
1981

Keyboard Shortcuts

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