Fossil SCM

Add the "ziplink" robot-restrict tag. Improvements to the /rchvdwnld page.

drh 2025-10-18 11:55 timeline-enhance-2025
Commit 58a99696748c0ea885e6353ab41558d7835d65cc37757354aee34e431ed3002a
3 files changed +13 -10 +6 -4 +24 -14
+13 -10
--- src/robot.c
+++ src/robot.c
@@ -263,20 +263,22 @@
263263
** The VALUE of this setting is a list of GLOB patterns that match
264264
** pages for which complex HTTP requests from unauthenticated clients
265265
** should be disallowed. "Unauthenticated" means the user is "nobody".
266266
** The recommended value for this setting is:
267267
**
268
-** timelineX,diff,annotate,fileage,file,finfo,reports
268
+** timelineX,diff,annotate,fileage,file,finfo,reports,tree,ziplink,hexdump
269269
**
270270
** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
271271
** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
272
-** also covers /tarball and /sqlar. If a tag has an "X" character appended,
273
-** then it only applies if query parameters are such that the page is
274
-** particularly difficult to compute. In all other case, the tag should
275
-** exactly match the page name. Useful "X" tags include "timelineX"
276
-** and "zipX". See the robot-zip-leaf and robot-zip-tag settings
277
-** for additional controls associated with the "zipX" restriction.
272
+** also covers /tarball and /sqlar. The special "ziplink" tag covers any
273
+** page that contains a lot of hyperlinks to a "zip" page. If a tag has
274
+** an "X" character appended then it only applies if query parameters are
275
+** such that the page is particularly difficult to compute. In all other
276
+** case, the tag should exactly match the page name. Useful "X" tags
277
+** include "timelineX" and "zipX". See the [[robot-zip-leaf]] and
278
+** [[robot-zip-tag]] settings for additional controls associated with
279
+** the "zipX" restriction.
278280
**
279281
** Change this setting "off" to disable all robot restrictions.
280282
*/
281283
/*
282284
** SETTING: robot-exception width=40 block-text
@@ -299,29 +301,30 @@
299301
/*
300302
** SETTING: robot-zip-leaf boolean
301303
**
302304
** If this setting is true, the robots are allowed to download tarballs,
303305
** ZIP-archives, and SQL-archives even though "zipX" is found in
304
-** the robot-restrict setting as long as the specific check-in being
306
+** the [[robot-restrict]] setting as long as the specific check-in being
305307
** downloaded is a leaf check-in.
306308
*/
307309
/*
308310
** SETTING: robot-zip-tag width=40 block-text
309311
**
310312
** If this setting is a list of GLOB patterns matching tags,
311313
** then robots are allowed to download tarballs, ZIP-archives, and
312
-** SQL-archives even though "zipX" appears in robot-restrict, as long as
314
+** SQL-archives even though "zipX" appears in [[robot-restrict]], as long as
313315
** the specific check-in being downloaded has a tags that matches
314316
** the GLOB list of this setting. Recommended value:
315317
** "release,robot-access".
316318
*/
317319
318320
/*
319321
** Return the default restriction GLOB
320322
*/
321323
const char *robot_restrict_default(void){
322
- return "timelineX,diff,annotate,fileage,file,finfo,reports";
324
+ return "timelineX,diff,annotate,fileage,file,finfo,reports,"
325
+ "tree,hexdump,ziplink";
323326
}
324327
325328
/*
326329
** Return true if zTag matches one of the tags in the robot-restrict
327330
** setting.
328331
--- src/robot.c
+++ src/robot.c
@@ -263,20 +263,22 @@
263 ** The VALUE of this setting is a list of GLOB patterns that match
264 ** pages for which complex HTTP requests from unauthenticated clients
265 ** should be disallowed. "Unauthenticated" means the user is "nobody".
266 ** The recommended value for this setting is:
267 **
268 ** timelineX,diff,annotate,fileage,file,finfo,reports
269 **
270 ** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
271 ** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
272 ** also covers /tarball and /sqlar. If a tag has an "X" character appended,
273 ** then it only applies if query parameters are such that the page is
274 ** particularly difficult to compute. In all other case, the tag should
275 ** exactly match the page name. Useful "X" tags include "timelineX"
276 ** and "zipX". See the robot-zip-leaf and robot-zip-tag settings
277 ** for additional controls associated with the "zipX" restriction.
 
 
278 **
279 ** Change this setting "off" to disable all robot restrictions.
280 */
281 /*
282 ** SETTING: robot-exception width=40 block-text
@@ -299,29 +301,30 @@
299 /*
300 ** SETTING: robot-zip-leaf boolean
301 **
302 ** If this setting is true, the robots are allowed to download tarballs,
303 ** ZIP-archives, and SQL-archives even though "zipX" is found in
304 ** the robot-restrict setting as long as the specific check-in being
305 ** downloaded is a leaf check-in.
306 */
307 /*
308 ** SETTING: robot-zip-tag width=40 block-text
309 **
310 ** If this setting is a list of GLOB patterns matching tags,
311 ** then robots are allowed to download tarballs, ZIP-archives, and
312 ** SQL-archives even though "zipX" appears in robot-restrict, as long as
313 ** the specific check-in being downloaded has a tags that matches
314 ** the GLOB list of this setting. Recommended value:
315 ** "release,robot-access".
316 */
317
318 /*
319 ** Return the default restriction GLOB
320 */
321 const char *robot_restrict_default(void){
322 return "timelineX,diff,annotate,fileage,file,finfo,reports";
 
323 }
324
325 /*
326 ** Return true if zTag matches one of the tags in the robot-restrict
327 ** setting.
328
--- src/robot.c
+++ src/robot.c
@@ -263,20 +263,22 @@
263 ** The VALUE of this setting is a list of GLOB patterns that match
264 ** pages for which complex HTTP requests from unauthenticated clients
265 ** should be disallowed. "Unauthenticated" means the user is "nobody".
266 ** The recommended value for this setting is:
267 **
268 ** timelineX,diff,annotate,fileage,file,finfo,reports,tree,ziplink,hexdump
269 **
270 ** The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
271 ** /vpatch. The "annotate" tag also covers /blame and /praise. "zip"
272 ** also covers /tarball and /sqlar. The special "ziplink" tag covers any
273 ** page that contains a lot of hyperlinks to a "zip" page. If a tag has
274 ** an "X" character appended then it only applies if query parameters are
275 ** such that the page is particularly difficult to compute. In all other
276 ** case, the tag should exactly match the page name. Useful "X" tags
277 ** include "timelineX" and "zipX". See the [[robot-zip-leaf]] and
278 ** [[robot-zip-tag]] settings for additional controls associated with
279 ** the "zipX" restriction.
280 **
281 ** Change this setting "off" to disable all robot restrictions.
282 */
283 /*
284 ** SETTING: robot-exception width=40 block-text
@@ -299,29 +301,30 @@
301 /*
302 ** SETTING: robot-zip-leaf boolean
303 **
304 ** If this setting is true, the robots are allowed to download tarballs,
305 ** ZIP-archives, and SQL-archives even though "zipX" is found in
306 ** the [[robot-restrict]] setting as long as the specific check-in being
307 ** downloaded is a leaf check-in.
308 */
309 /*
310 ** SETTING: robot-zip-tag width=40 block-text
311 **
312 ** If this setting is a list of GLOB patterns matching tags,
313 ** then robots are allowed to download tarballs, ZIP-archives, and
314 ** SQL-archives even though "zipX" appears in [[robot-restrict]], as long as
315 ** the specific check-in being downloaded has a tags that matches
316 ** the GLOB list of this setting. Recommended value:
317 ** "release,robot-access".
318 */
319
320 /*
321 ** Return the default restriction GLOB
322 */
323 const char *robot_restrict_default(void){
324 return "timelineX,diff,annotate,fileage,file,finfo,reports,"
325 "tree,hexdump,ziplink";
326 }
327
328 /*
329 ** Return true if zTag matches one of the tags in the robot-restrict
330 ** setting.
331
+6 -4
--- src/setup.c
+++ src/setup.c
@@ -488,14 +488,16 @@
488488
@ <p>
489489
@ &emsp;&emsp;&emsp;<tt>%h(robot_restrict_default())</tt>
490490
@ <p>
491491
@ The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
492492
@ /vpatch. The "annotate" tag covers /annotate and also /blame and
493
- @ /praise. The "zip" covers itself and also /tarball and /sqlar. If a
494
- @ tag has an "X" character appended, then it only applies if query
495
- @ parameters are such that the page is expensive and/or unusual.
496
- @ In all other case, the tag should exactly match the page name.
493
+ @ /praise. The "zip" covers itself and also /tarball and /sqlar. The
494
+ @ "ziplink" page means any page that contains hyperlinks to a "zip" page.
495
+ @ If a tag has an "X" character appended (ex: "timelineX") then it only
496
+ @ applies if query parameters are such that the page is expensive
497
+ @ and/or unusual. In all other case, the tag should exactly match
498
+ @ the page name.
497499
@
498500
@ To disable robot restrictions, change this setting to "off".
499501
@ (Property: robot-restrict)
500502
@ <br>
501503
textarea_attribute("", 2, 80,
502504
--- src/setup.c
+++ src/setup.c
@@ -488,14 +488,16 @@
488 @ <p>
489 @ &emsp;&emsp;&emsp;<tt>%h(robot_restrict_default())</tt>
490 @ <p>
491 @ The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
492 @ /vpatch. The "annotate" tag covers /annotate and also /blame and
493 @ /praise. The "zip" covers itself and also /tarball and /sqlar. If a
494 @ tag has an "X" character appended, then it only applies if query
495 @ parameters are such that the page is expensive and/or unusual.
496 @ In all other case, the tag should exactly match the page name.
 
 
497 @
498 @ To disable robot restrictions, change this setting to "off".
499 @ (Property: robot-restrict)
500 @ <br>
501 textarea_attribute("", 2, 80,
502
--- src/setup.c
+++ src/setup.c
@@ -488,14 +488,16 @@
488 @ <p>
489 @ &emsp;&emsp;&emsp;<tt>%h(robot_restrict_default())</tt>
490 @ <p>
491 @ The "diff" tag covers all diffing pages such as /vdiff, /fdiff, and
492 @ /vpatch. The "annotate" tag covers /annotate and also /blame and
493 @ /praise. The "zip" covers itself and also /tarball and /sqlar. The
494 @ "ziplink" page means any page that contains hyperlinks to a "zip" page.
495 @ If a tag has an "X" character appended (ex: "timelineX") then it only
496 @ applies if query parameters are such that the page is expensive
497 @ and/or unusual. In all other case, the tag should exactly match
498 @ the page name.
499 @
500 @ To disable robot restrictions, change this setting to "off".
501 @ (Property: robot-restrict)
502 @ <br>
503 textarea_attribute("", 2, 80,
504
+24 -14
--- src/tar.c
+++ src/tar.c
@@ -1050,10 +1050,11 @@
10501050
int tmFlags; /* Timeline display flags */
10511051
int n; /* Number of suggested downloads */
10521052
10531053
login_check_credentials();
10541054
if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1055
+ robot_restrict("ziplink");
10551056
10561057
style_set_current_feature("timeline");
10571058
style_header("Suggested Tarballs And ZIP Archives");
10581059
10591060
zTarlistCfg = db_get("suggested-tarlist","off");
@@ -1139,10 +1140,11 @@
11391140
int nUuid;
11401141
int rid;
11411142
login_check_credentials();
11421143
if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
11431144
robot_restrict("zip");
1145
+ robot_restrict("ziplink");
11441146
11451147
zUuid = P("name");
11461148
if( zUuid==0
11471149
|| (nUuid = (int)strlen(zUuid))<6
11481150
|| !validate16(zUuid,-1)
@@ -1151,22 +1153,30 @@
11511153
){
11521154
fossil_redirect_home();
11531155
}
11541156
zUuid = db_text(zUuid, "SELECT uuid FROM blob WHERE rid=%d", rid);
11551157
style_header("Downloads For Check-in %!S", zUuid);
1156
- zBase = archive_base_name(rid);
1157
- @ <ul>
1158
- @ <li><p>
1159
- @ Tarball: %z(href("%R/tarball/%!S/%s.tar.gz",zUuid,zBase))\
1160
- @ %s(g.zBaseURL)/tarball/%!S(zUuid)/%s(zBase).tar.gz</a>
1161
- @
1162
- @ <li><p>
1163
- @ ZIP: %z(href("%R/zip/%!S/%s.zip",zUuid,zBase))\
1164
- @ %s(g.zBaseURL)/zip/%!S(zUuid)/%s(zBase).zip</a>
1165
- @
1166
- @ <li><p>
1167
- @ SQLAR: %z(href("%R/sqlar/%!S/%s.sqlar",zUuid,zBase))\
1168
- @ %s(g.zBaseURL)/sqlar/%!S(zUuid)/%s(zBase).sqlar</a>
1169
- @ </ul>
1158
+ style_submenu_element("Info","%R/info/%!S",zUuid);
1159
+ style_submenu_element("Context","%R/timeline?c=%!S&y=ci&n=11",zUuid);
1160
+ zBase = archive_base_name(rid);
1161
+ @ <table class="label-value">
1162
+ @ <tr>
1163
+ @ <th>Tarball:</th>
1164
+ @ <td>%z(href("%R/tarball/%!S/%s.tar.gz",zUuid,zBase))\
1165
+ @ %s(g.zBaseURL)/tarball/%!S(zUuid)/%s(zBase).tar.gz</a></td>
1166
+ @ </tr>
1167
+ @
1168
+ @ <tr>
1169
+ @ <th>ZIP:</th>
1170
+ @ <td>%z(href("%R/zip/%!S/%s.zip",zUuid,zBase))\
1171
+ @ %s(g.zBaseURL)/zip/%!S(zUuid)/%s(zBase).zip</a></td>
1172
+ @ </tr>
1173
+ @
1174
+ @ <tr>
1175
+ @ <th>SQLAR:</th>
1176
+ @ <td>%z(href("%R/sqlar/%!S/%s.sqlar",zUuid,zBase))\
1177
+ @ %s(g.zBaseURL)/sqlar/%!S(zUuid)/%s(zBase).sqlar</a></td>
1178
+ @ </tr>
1179
+ @ </table>
11701180
fossil_free(zBase);
11711181
style_finish_page();
11721182
}
11731183
--- src/tar.c
+++ src/tar.c
@@ -1050,10 +1050,11 @@
1050 int tmFlags; /* Timeline display flags */
1051 int n; /* Number of suggested downloads */
1052
1053 login_check_credentials();
1054 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
 
1055
1056 style_set_current_feature("timeline");
1057 style_header("Suggested Tarballs And ZIP Archives");
1058
1059 zTarlistCfg = db_get("suggested-tarlist","off");
@@ -1139,10 +1140,11 @@
1139 int nUuid;
1140 int rid;
1141 login_check_credentials();
1142 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1143 robot_restrict("zip");
 
1144
1145 zUuid = P("name");
1146 if( zUuid==0
1147 || (nUuid = (int)strlen(zUuid))<6
1148 || !validate16(zUuid,-1)
@@ -1151,22 +1153,30 @@
1151 ){
1152 fossil_redirect_home();
1153 }
1154 zUuid = db_text(zUuid, "SELECT uuid FROM blob WHERE rid=%d", rid);
1155 style_header("Downloads For Check-in %!S", zUuid);
1156 zBase = archive_base_name(rid);
1157 @ <ul>
1158 @ <li><p>
1159 @ Tarball: %z(href("%R/tarball/%!S/%s.tar.gz",zUuid,zBase))\
1160 @ %s(g.zBaseURL)/tarball/%!S(zUuid)/%s(zBase).tar.gz</a>
1161 @
1162 @ <li><p>
1163 @ ZIP: %z(href("%R/zip/%!S/%s.zip",zUuid,zBase))\
1164 @ %s(g.zBaseURL)/zip/%!S(zUuid)/%s(zBase).zip</a>
1165 @
1166 @ <li><p>
1167 @ SQLAR: %z(href("%R/sqlar/%!S/%s.sqlar",zUuid,zBase))\
1168 @ %s(g.zBaseURL)/sqlar/%!S(zUuid)/%s(zBase).sqlar</a>
1169 @ </ul>
 
 
 
 
 
 
 
 
1170 fossil_free(zBase);
1171 style_finish_page();
1172 }
1173
--- src/tar.c
+++ src/tar.c
@@ -1050,10 +1050,11 @@
1050 int tmFlags; /* Timeline display flags */
1051 int n; /* Number of suggested downloads */
1052
1053 login_check_credentials();
1054 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1055 robot_restrict("ziplink");
1056
1057 style_set_current_feature("timeline");
1058 style_header("Suggested Tarballs And ZIP Archives");
1059
1060 zTarlistCfg = db_get("suggested-tarlist","off");
@@ -1139,10 +1140,11 @@
1140 int nUuid;
1141 int rid;
1142 login_check_credentials();
1143 if( !g.perm.Zip ){ login_needed(g.anon.Zip); return; }
1144 robot_restrict("zip");
1145 robot_restrict("ziplink");
1146
1147 zUuid = P("name");
1148 if( zUuid==0
1149 || (nUuid = (int)strlen(zUuid))<6
1150 || !validate16(zUuid,-1)
@@ -1151,22 +1153,30 @@
1153 ){
1154 fossil_redirect_home();
1155 }
1156 zUuid = db_text(zUuid, "SELECT uuid FROM blob WHERE rid=%d", rid);
1157 style_header("Downloads For Check-in %!S", zUuid);
1158 style_submenu_element("Info","%R/info/%!S",zUuid);
1159 style_submenu_element("Context","%R/timeline?c=%!S&y=ci&n=11",zUuid);
1160 zBase = archive_base_name(rid);
1161 @ <table class="label-value">
1162 @ <tr>
1163 @ <th>Tarball:</th>
1164 @ <td>%z(href("%R/tarball/%!S/%s.tar.gz",zUuid,zBase))\
1165 @ %s(g.zBaseURL)/tarball/%!S(zUuid)/%s(zBase).tar.gz</a></td>
1166 @ </tr>
1167 @
1168 @ <tr>
1169 @ <th>ZIP:</th>
1170 @ <td>%z(href("%R/zip/%!S/%s.zip",zUuid,zBase))\
1171 @ %s(g.zBaseURL)/zip/%!S(zUuid)/%s(zBase).zip</a></td>
1172 @ </tr>
1173 @
1174 @ <tr>
1175 @ <th>SQLAR:</th>
1176 @ <td>%z(href("%R/sqlar/%!S/%s.sqlar",zUuid,zBase))\
1177 @ %s(g.zBaseURL)/sqlar/%!S(zUuid)/%s(zBase).sqlar</a></td>
1178 @ </tr>
1179 @ </table>
1180 fossil_free(zBase);
1181 style_finish_page();
1182 }
1183

Keyboard Shortcuts

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