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.
Commit
55c972103ffc130670ec3c33a6cd8e1808a59bbdd5527fc978474b47f45ce49d
Parent
8779bd0b3a60ee2…
1 file changed
+3
-1
+3
-1
| --- src/cookies.c | ||
| +++ src/cookies.c | ||
| @@ -256,11 +256,13 @@ | ||
| 256 | 256 | if( isQP ) continue; |
| 257 | 257 | if( fossil_isupper(zName[0]) ) continue; |
| 258 | 258 | if( bFDSonly && strcmp(zName, "fossil_display_settings")!=0 ) continue; |
| 259 | 259 | zDel = mprintf("del%s",zName); |
| 260 | 260 | 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); | |
| 262 | 264 | cgi_redirect(g.zPath); |
| 263 | 265 | } |
| 264 | 266 | nCookie++; |
| 265 | 267 | @ <li><p><b>%h(zName)</b>: %h(zValue) |
| 266 | 268 | @ <input type="submit" name="%h(zDel)" value="Delete"> |
| 267 | 269 |
| --- 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 |