Fossil SCM

In import --svn, refuse a node whose path within its branch is not a simple pathname, such as one with a "." or ".." component or a doubled slash. The check-in holding such a file could not be parsed and its revision was left out without a message.

dmestas 2026-11-20 21:26 UTC small-fixes
Commit f36b1348e0d6c59de6bd23d68627a420b8515f5873a0c80a417617786528de37
1 file changed +3
--- src/import.c
+++ src/import.c
@@ -1538,10 +1538,13 @@
15381538
svn_free_rec(&rec);
15391539
continue;
15401540
}
15411541
if( zAction==0 ){
15421542
fossil_fatal("svn-dump data format broken");
1543
+ }
1544
+ if( zFile[0]!=0 && !file_is_simple_pathname_nonstrict(zFile) ){
1545
+ fossil_fatal("svn path is not a valid file name: %s", zFile);
15431546
}
15441547
if( (zTemp = svn_find_header(rec, "Text-delta")) ){
15451548
deltaFlag = strncmp(zTemp, "true", 4)==0;
15461549
}
15471550
if( strncmp(zAction, "delete", 6)==0
15481551
--- src/import.c
+++ src/import.c
@@ -1538,10 +1538,13 @@
1538 svn_free_rec(&rec);
1539 continue;
1540 }
1541 if( zAction==0 ){
1542 fossil_fatal("svn-dump data format broken");
 
 
 
1543 }
1544 if( (zTemp = svn_find_header(rec, "Text-delta")) ){
1545 deltaFlag = strncmp(zTemp, "true", 4)==0;
1546 }
1547 if( strncmp(zAction, "delete", 6)==0
1548
--- src/import.c
+++ src/import.c
@@ -1538,10 +1538,13 @@
1538 svn_free_rec(&rec);
1539 continue;
1540 }
1541 if( zAction==0 ){
1542 fossil_fatal("svn-dump data format broken");
1543 }
1544 if( zFile[0]!=0 && !file_is_simple_pathname_nonstrict(zFile) ){
1545 fossil_fatal("svn path is not a valid file name: %s", zFile);
1546 }
1547 if( (zTemp = svn_find_header(rec, "Text-delta")) ){
1548 deltaFlag = strncmp(zTemp, "true", 4)==0;
1549 }
1550 if( strncmp(zAction, "delete", 6)==0
1551

Keyboard Shortcuts

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