Fossil SCM

When deleting cookies via /cookies, use a path of "/" for ROBOT_COOKIE. The alternative would be to set that cookie to be repo-local (i.e. set its path to g.zTop), which would be unfortunate for servers which host many fossils.

stephan 2025-08-22 15:49 trunk
Commit 55c972103ffc130670ec3c33a6cd8e1808a59bbdd5527fc978474b47f45ce49d
1 file changed +3 -1
+3 -1
--- src/cookies.c
+++ src/cookies.c
@@ -256,11 +256,13 @@
256256
if( isQP ) continue;
257257
if( fossil_isupper(zName[0]) ) continue;
258258
if( bFDSonly && strcmp(zName, "fossil_display_settings")!=0 ) continue;
259259
zDel = mprintf("del%s",zName);
260260
if( P(zDel)!=0 ){
261
- cgi_set_cookie(zName, "", 0, -1);
261
+ const char *zPath = fossil_strcmp(ROBOT_COOKIE,zName)==0
262
+ ? "/" : 0;
263
+ cgi_set_cookie(zName, "", zPath, -1);
262264
cgi_redirect(g.zPath);
263265
}
264266
nCookie++;
265267
@ <li><p><b>%h(zName)</b>: %h(zValue)
266268
@ <input type="submit" name="%h(zDel)" value="Delete">
267269
--- src/cookies.c
+++ src/cookies.c
@@ -256,11 +256,13 @@
256 if( isQP ) continue;
257 if( fossil_isupper(zName[0]) ) continue;
258 if( bFDSonly && strcmp(zName, "fossil_display_settings")!=0 ) continue;
259 zDel = mprintf("del%s",zName);
260 if( P(zDel)!=0 ){
261 cgi_set_cookie(zName, "", 0, -1);
 
 
262 cgi_redirect(g.zPath);
263 }
264 nCookie++;
265 @ <li><p><b>%h(zName)</b>: %h(zValue)
266 @ <input type="submit" name="%h(zDel)" value="Delete">
267
--- src/cookies.c
+++ src/cookies.c
@@ -256,11 +256,13 @@
256 if( isQP ) continue;
257 if( fossil_isupper(zName[0]) ) continue;
258 if( bFDSonly && strcmp(zName, "fossil_display_settings")!=0 ) continue;
259 zDel = mprintf("del%s",zName);
260 if( P(zDel)!=0 ){
261 const char *zPath = fossil_strcmp(ROBOT_COOKIE,zName)==0
262 ? "/" : 0;
263 cgi_set_cookie(zName, "", zPath, -1);
264 cgi_redirect(g.zPath);
265 }
266 nCookie++;
267 @ <li><p><b>%h(zName)</b>: %h(zValue)
268 @ <input type="submit" name="%h(zDel)" value="Delete">
269

Keyboard Shortcuts

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