Fossil SCM

When a client keeps the links a server sends, parse a link only if it begins with http:// or https://. Any other text was parsed as a path on the client and, if no repository was there, ended the sync with an error.

dmestas 2026-11-18 21:13 UTC small-fixes
Commit 77cabadca801cf562a2998fd47f6d7684cf7c6ce7a635bfbd34e98a7ea0b1425
1 file changed +5 -1
+5 -1
--- src/xfer.c
+++ src/xfer.c
@@ -3000,11 +3000,15 @@
30003000
char *zArg = blob_str(&xfer.aToken[3]);
30013001
i64 iTime = strtoll(blob_str(&xfer.aToken[4]),0,0);
30023002
memset(&x, 0, sizeof(x));
30033003
defossilize(zUrl);
30043004
defossilize(zArg);
3005
- url_parse_local(zUrl, URL_OMIT_USER, &x);
3005
+ if( fossil_strnicmp(zUrl, "http://", 7)==0
3006
+ || fossil_strnicmp(zUrl, "https://", 8)==0
3007
+ ){
3008
+ url_parse_local(zUrl, URL_OMIT_USER, &x);
3009
+ }
30063010
if( x.protocol
30073011
&& strncmp(x.protocol,"http",4)==0
30083012
&& iTime>0
30093013
){
30103014
db_unprotect(PROTECT_CONFIG);
30113015
--- src/xfer.c
+++ src/xfer.c
@@ -3000,11 +3000,15 @@
3000 char *zArg = blob_str(&xfer.aToken[3]);
3001 i64 iTime = strtoll(blob_str(&xfer.aToken[4]),0,0);
3002 memset(&x, 0, sizeof(x));
3003 defossilize(zUrl);
3004 defossilize(zArg);
3005 url_parse_local(zUrl, URL_OMIT_USER, &x);
 
 
 
 
3006 if( x.protocol
3007 && strncmp(x.protocol,"http",4)==0
3008 && iTime>0
3009 ){
3010 db_unprotect(PROTECT_CONFIG);
3011
--- src/xfer.c
+++ src/xfer.c
@@ -3000,11 +3000,15 @@
3000 char *zArg = blob_str(&xfer.aToken[3]);
3001 i64 iTime = strtoll(blob_str(&xfer.aToken[4]),0,0);
3002 memset(&x, 0, sizeof(x));
3003 defossilize(zUrl);
3004 defossilize(zArg);
3005 if( fossil_strnicmp(zUrl, "http://", 7)==0
3006 || fossil_strnicmp(zUrl, "https://", 8)==0
3007 ){
3008 url_parse_local(zUrl, URL_OMIT_USER, &x);
3009 }
3010 if( x.protocol
3011 && strncmp(x.protocol,"http",4)==0
3012 && iTime>0
3013 ){
3014 db_unprotect(PROTECT_CONFIG);
3015

Keyboard Shortcuts

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