Fossil

Check-in [0fc9b5e1]
Login

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

Overview
Comment:Fix another issue with directory search for CGI.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0fc9b5e1f2110b7b0dc1ca40bde3e47455429830
User & Date: drh 2011-04-18 19:32:59
References
2011-09-11
12:04 Fixed ticket [cc8fb657]: process_one_web_page crashes if zPathInfo is NULL plus 2 other changes artifact: 81dfc4b0 user: dmitry
Context
2011-04-18
23:46
Enhance the merge-conflict notation to show both the two recent versions and also the common ancestor version. check-in: 792a3bc9 user: drh tags: trunk
19:32
Fix another issue with directory search for CGI. check-in: 0fc9b5e1 user: drh tags: trunk
19:17
Fix to the multi-repository name parser for CGI. check-in: 71a1c7b2 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
  if( !g.repositoryOpen ){
    char *zRepo, *zToFree;
    const char *zOldScript = PD("SCRIPT_NAME", "");
    char *zNewScript;
    int j, k;
    i64 szFile;

    i = 1;
    while( 1 ){
      while( zPathInfo[i] && zPathInfo[i]!='/' ){ i++; }
      zRepo = zToFree = mprintf("%s%.*s.fossil",g.zRepositoryName,i,zPathInfo);

      /* To avoid mischief, make sure the repository basename contains no
      ** characters other than alphanumerics, "-", "/", and "_".
      */







|







899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
  if( !g.repositoryOpen ){
    char *zRepo, *zToFree;
    const char *zOldScript = PD("SCRIPT_NAME", "");
    char *zNewScript;
    int j, k;
    i64 szFile;

    i = zPathInfo[0]!=0;
    while( 1 ){
      while( zPathInfo[i] && zPathInfo[i]!='/' ){ i++; }
      zRepo = zToFree = mprintf("%s%.*s.fossil",g.zRepositoryName,i,zPathInfo);

      /* To avoid mischief, make sure the repository basename contains no
      ** characters other than alphanumerics, "-", "/", and "_".
      */