Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch invalid-unicode Excluding Merge-Ins
This is equivalent to a diff from fe453a4893 to 9242c09ff9
2012-11-25
| ||
11:50 | Disallow invalid unicode characters in filenames. check-in: 897dfa48b4 user: drh tags: trunk | |
2012-11-23
| ||
19:33 | some unnecessary spacing check-in: d13143eb3b user: jan.nijtmans tags: trunk | |
15:57 | All markup of the form ... with an options "links" or "links=BOOLEAN" attribute. Improved TH1 tracing and error reporting capabilities. Improved documentation on how reports work. check-in: 23c75abde4 user: drh tags: ticket-enhancements | |
11:29 | merge trunk "filename contains illegal characters" is now a warning check-in: d3bee356ba user: jan.nijtmans tags: ticket-d17d6e5b17 | |
10:35 | Disallow invalid unicode characters Closed-Leaf check-in: 9242c09ff9 user: jan.nijtmans tags: invalid-unicode | |
01:50 | When db_open_config() is called with the useAttach parameter set to non-zero, it may need to close and reopen the database using ATTACH if that was not done previously. check-in: fe453a4893 user: drh tags: trunk | |
2012-11-22
| ||
23:35 | Be consistent about display of check-in comments as either text/plain or text/x-fossil-wiki. When the user configures text/plain, use that format everywhere. check-in: 2c6fa9c3b0 user: drh tags: trunk | |
10:16 | Modify db_open_config() and associated routines to make their internal state more consistent and discoverable. Closed-Leaf check-in: 52a6868700 user: mistachkin tags: dbOpenConfig | |
Changes to src/add.c.
136 136 static int add_one_file( 137 137 const char *zPath, /* Tree-name of file to add. */ 138 138 int vid, /* Add to this VFILE */ 139 139 int caseSensitive /* True if filenames are case sensitive */ 140 140 ){ 141 141 const char *zCollate = caseSensitive ? "binary" : "nocase"; 142 142 if( !file_is_simple_pathname(zPath) ){ 143 - fossil_fatal("filename contains illegal characters: %s", zPath); 143 + fossil_warning("filename contains illegal characters: %s", zPath); 144 + return 0; 144 145 } 145 146 if( db_exists("SELECT 1 FROM vfile" 146 147 " WHERE pathname=%Q COLLATE %s", zPath, zCollate) ){ 147 148 db_multi_exec("UPDATE vfile SET deleted=0" 148 149 " WHERE pathname=%Q COLLATE %s", zPath, zCollate); 149 150 }else{ 150 151 char *zFullname = mprintf("%s%s", g.zLocalRoot, zPath);
Changes to src/checkout.c.
104 104 ManifestFile *pFile; 105 105 106 106 /* Check the EXE permission status of all files 107 107 */ 108 108 pManifest = manifest_get(vid, CFTYPE_MANIFEST); 109 109 if( pManifest==0 ) return; 110 110 blob_zero(&filename); 111 - blob_appendf(&filename, "%s/", g.zLocalRoot); 111 + blob_appendf(&filename, "%s", g.zLocalRoot); 112 112 baseLen = blob_size(&filename); 113 113 manifest_file_rewind(pManifest); 114 114 while( (pFile = manifest_file_next(pManifest, 0))!=0 ){ 115 115 int isExe; 116 116 blob_append(&filename, pFile->zName, -1); 117 117 isExe = pFile->zPerm && strstr(pFile->zPerm, "x"); 118 118 file_wd_setexe(blob_str(&filename), isExe);
Changes to src/db.c.
1695 1695 } 1696 1696 /* Attempt to read value from file in checkout if there wasn't a cache hit 1697 1697 ** and a checkout is open. */ 1698 1698 if( cacheEntry==0 ){ 1699 1699 Blob versionedPathname; 1700 1700 char *zVersionedPathname; 1701 1701 blob_zero(&versionedPathname); 1702 - blob_appendf(&versionedPathname, "%s/.fossil-settings/%s", 1702 + blob_appendf(&versionedPathname, "%s.fossil-settings/%s", 1703 1703 g.zLocalRoot, zName); 1704 1704 zVersionedPathname = blob_str(&versionedPathname); 1705 1705 if( file_size(zVersionedPathname)>=0 ){ 1706 1706 /* File exists, and contains the value for this setting. Load from 1707 1707 ** the file. */ 1708 1708 Blob setting; 1709 1709 blob_zero(&setting);
Changes to src/file.c.
493 493 char c = z[0]; 494 494 if( c=='/' || c==0 ) return 0; 495 495 if( c=='.' ){ 496 496 if( z[1]=='/' || z[1]==0 ) return 0; 497 497 if( z[1]=='.' && (z[2]=='/' || z[2]==0) ) return 0; 498 498 } 499 499 for(i=0; (c=z[i])!=0; i++){ 500 + if( (c & 0xf0) == 0xf0 ) { 501 + /* Unicode characters > U+FFFF are not supported. 502 + * Windows XP and earlier cannot handle them. 503 + */ 504 + return 0; 505 + } 506 + if( (c & 0xf0) == 0xe0 ) { 507 + /* This is a 3-byte UTF-8 character */ 508 + if ( (c & 0xfe) == 0xee ){ 509 + /* Range U+E000 - U+FFFF (Starting with 0xee or 0xef in UTF-8 ) */ 510 + if ( (c & 1) && ((z[i+1] & 0xff) >= 0xa4) ){ 511 + /* But exclude U+F900 - U+FFFF (0xef followed by byte >= 0xa4), 512 + * which contain valid characters. */ 513 + continue; 514 + } 515 + /* Unicode character in the range U+E000 - U+F8FF are for 516 + * private use, they shouldn't occur in filenames. */ 517 + return 0; 518 + } 519 + if( ((c & 0xff) == 0xed) && ((z[i+1] & 0xe0) == 0xa0) ){ 520 + /* Unicode character in the range U+D800 - U+DFFF are for 521 + * surrogate pairs, they shouldn't occur in filenames. */ 522 + return 0; 523 + } 524 + } 500 525 if( c=='\\' || c=='*' || c=='[' || c==']' || c=='?' ){ 501 526 return 0; 502 527 } 503 528 if( c=='/' ){ 504 529 if( z[i+1]=='/' ) return 0; 505 530 if( z[i+1]=='.' ){ 506 531 if( z[i+2]=='/' || z[i+2]==0 ) return 0;