Fossil SCM

Merge trunk fixes into the timeline-enhance-2025 branch.

drh 2025-10-17 13:35 timeline-enhance-2025 merge
Commit 36f17b0c910deaee02d2c7e319b187f459c87f0a9683106e370f363b0ff080cf
+10
--- src/cgi.c
+++ src/cgi.c
@@ -2291,10 +2291,11 @@
22912291
void cgi_handle_ssh_http_request(const char *zIpAddr){
22922292
static int nCycles = 0;
22932293
static char *zCmd = 0;
22942294
char *z, *zToken;
22952295
int i;
2296
+ size_t n;
22962297
char zLine[2000]; /* A single line of input. */
22972298
22982299
assert( !g.httpUseSSL );
22992300
#ifdef FOSSIL_ENABLE_JSON
23002301
if( nCycles==0 ){ json_bootstrap_early(); }
@@ -2353,10 +2354,19 @@
23532354
23542355
zToken = extract_token(z, &z);
23552356
if( zToken==0 ){
23562357
malformed_request("malformed URL in HTTP header");
23572358
}
2359
+ n = strlen(g.zRepositoryName);
2360
+ if( fossil_strncmp(g.zRepositoryName, zToken, n)==0
2361
+ && (zToken[n]=='/' || zToken[n]==0)
2362
+ ){
2363
+ zToken += n;
2364
+ }
2365
+ if( zToken && strlen(zToken)==0 ){
2366
+ malformed_request("malformed URL in HTTP header");
2367
+ }
23582368
if( nCycles==0 ){
23592369
cgi_setenv("REQUEST_URI", zToken);
23602370
cgi_setenv("SCRIPT_NAME", "");
23612371
}
23622372
23632373
--- src/cgi.c
+++ src/cgi.c
@@ -2291,10 +2291,11 @@
2291 void cgi_handle_ssh_http_request(const char *zIpAddr){
2292 static int nCycles = 0;
2293 static char *zCmd = 0;
2294 char *z, *zToken;
2295 int i;
 
2296 char zLine[2000]; /* A single line of input. */
2297
2298 assert( !g.httpUseSSL );
2299 #ifdef FOSSIL_ENABLE_JSON
2300 if( nCycles==0 ){ json_bootstrap_early(); }
@@ -2353,10 +2354,19 @@
2353
2354 zToken = extract_token(z, &z);
2355 if( zToken==0 ){
2356 malformed_request("malformed URL in HTTP header");
2357 }
 
 
 
 
 
 
 
 
 
2358 if( nCycles==0 ){
2359 cgi_setenv("REQUEST_URI", zToken);
2360 cgi_setenv("SCRIPT_NAME", "");
2361 }
2362
2363
--- src/cgi.c
+++ src/cgi.c
@@ -2291,10 +2291,11 @@
2291 void cgi_handle_ssh_http_request(const char *zIpAddr){
2292 static int nCycles = 0;
2293 static char *zCmd = 0;
2294 char *z, *zToken;
2295 int i;
2296 size_t n;
2297 char zLine[2000]; /* A single line of input. */
2298
2299 assert( !g.httpUseSSL );
2300 #ifdef FOSSIL_ENABLE_JSON
2301 if( nCycles==0 ){ json_bootstrap_early(); }
@@ -2353,10 +2354,19 @@
2354
2355 zToken = extract_token(z, &z);
2356 if( zToken==0 ){
2357 malformed_request("malformed URL in HTTP header");
2358 }
2359 n = strlen(g.zRepositoryName);
2360 if( fossil_strncmp(g.zRepositoryName, zToken, n)==0
2361 && (zToken[n]=='/' || zToken[n]==0)
2362 ){
2363 zToken += n;
2364 }
2365 if( zToken && strlen(zToken)==0 ){
2366 malformed_request("malformed URL in HTTP header");
2367 }
2368 if( nCycles==0 ){
2369 cgi_setenv("REQUEST_URI", zToken);
2370 cgi_setenv("SCRIPT_NAME", "");
2371 }
2372
2373
+1 -1
--- src/checkout.c
+++ src/checkout.c
@@ -556,11 +556,11 @@
556556
}
557557
}
558558
}
559559
560560
/* Construct a subpath on the URL if necessary */
561
- if( g.url.isSsh || g.url.isFile ){
561
+ if( g.url.isFile ){
562562
g.url.subpath = mprintf("/sqlar/%t/%t.sqlar", zVers, zDest);
563563
}else{
564564
g.url.subpath = mprintf("%s/sqlar/%t/%t.sqlar", g.url.path, zVers, zDest);
565565
}
566566
567567
--- src/checkout.c
+++ src/checkout.c
@@ -556,11 +556,11 @@
556 }
557 }
558 }
559
560 /* Construct a subpath on the URL if necessary */
561 if( g.url.isSsh || g.url.isFile ){
562 g.url.subpath = mprintf("/sqlar/%t/%t.sqlar", zVers, zDest);
563 }else{
564 g.url.subpath = mprintf("%s/sqlar/%t/%t.sqlar", g.url.path, zVers, zDest);
565 }
566
567
--- src/checkout.c
+++ src/checkout.c
@@ -556,11 +556,11 @@
556 }
557 }
558 }
559
560 /* Construct a subpath on the URL if necessary */
561 if( g.url.isFile ){
562 g.url.subpath = mprintf("/sqlar/%t/%t.sqlar", zVers, zDest);
563 }else{
564 g.url.subpath = mprintf("%s/sqlar/%t/%t.sqlar", g.url.path, zVers, zDest);
565 }
566
567
+4 -1
--- src/finfo.c
+++ src/finfo.c
@@ -813,11 +813,14 @@
813813
@ <tr class="timelineBottom" id="btm-%d(iTableId)">\
814814
@ <td></td><td></td><td></td></tr>
815815
}
816816
}
817817
@ </table>
818
- timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
818
+ {
819
+ int tmFlags = TIMELINE_GRAPH | TIMELINE_FILEDIFF;
820
+ timeline_output_graph_javascript(pGraph, tmFlags, iTableId);
821
+ }
819822
style_finish_page();
820823
}
821824
822825
/*
823826
** WEBPAGE: mlink
824827
--- src/finfo.c
+++ src/finfo.c
@@ -813,11 +813,14 @@
813 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
814 @ <td></td><td></td><td></td></tr>
815 }
816 }
817 @ </table>
818 timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
 
 
 
819 style_finish_page();
820 }
821
822 /*
823 ** WEBPAGE: mlink
824
--- src/finfo.c
+++ src/finfo.c
@@ -813,11 +813,14 @@
813 @ <tr class="timelineBottom" id="btm-%d(iTableId)">\
814 @ <td></td><td></td><td></td></tr>
815 }
816 }
817 @ </table>
818 {
819 int tmFlags = TIMELINE_GRAPH | TIMELINE_FILEDIFF;
820 timeline_output_graph_javascript(pGraph, tmFlags, iTableId);
821 }
822 style_finish_page();
823 }
824
825 /*
826 ** WEBPAGE: mlink
827

Keyboard Shortcuts

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