Fossil

Check-in [e726c8082e]
Login

Check-in [e726c8082e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not allow the "fossil server" command to serve any static content file that contains ".fossil" anywhere in its name. This prevents repository files and/or their journals from being downloaded as static content.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e726c8082ed4eb9370d4344732b3c1f35912a573
User & Date: drh 2012-12-01 02:57:05.676
Context
2012-12-01
03:25
Improvements to command-line argument glob expansion on windows. Globbing now works correctly when compiled with mingw-w64 and with msvc. It is mostly correct when compiled with mingw, but fails for some files with non-ascii names. ... (check-in: 8205c01cd4 user: drh tags: trunk)
02:57
Do not allow the "fossil server" command to serve any static content file that contains ".fossil" anywhere in its name. This prevents repository files and/or their journals from being downloaded as static content. ... (check-in: e726c8082e user: drh tags: trunk)
2012-11-30
21:03
Bump the version number to 1.25 and add a change log in preparation for the next release. ... (check-in: ed1e34c760 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
        assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
        zRepo[j] = 0;
        if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
          fossil_free(zToFree);
          i++;
          continue;
        }
        if( file_isfile(zRepo) ){
          Blob content;
          blob_read_from_file(&content, zRepo);
          cgi_set_content_type(mimetype_from_name(zRepo));
          cgi_set_content(&content);
          cgi_reply();
          return;
        }







|







1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
        assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
        zRepo[j] = 0;
        if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
          fossil_free(zToFree);
          i++;
          continue;
        }
        if( file_isfile(zRepo) && strglob("*.fossil*",zRepo)==0 ){
          Blob content;
          blob_read_from_file(&content, zRepo);
          cgi_set_content_type(mimetype_from_name(zRepo));
          cgi_set_content(&content);
          cgi_reply();
          return;
        }