Fossil SCM

Server Error (500) with missing repository name

Fixed

c481aa2fdbc67b7… · opened 12 years ago

Type
Code_Defect
Priority
Severity
Minor
Resolution
Fixed
Subsystem
Created
Aug. 12, 2014 9:52 a.m. UTC

I'm running fossil through the following CGI script, and everything works as expected:

#!/var/webs/www.example.com/public_html/cgi-bin/fossil
directory: /var/webs/www.example.com/public_html/fossil/

repository: /var/webs/www.example.com/public_html/fossil/PROJECT.fossil

notfound: http://example.com/fossil-notfound.html

However, when navigating to the CGI script without indicating a repository name in the URL (i.e. just http://example.com/cgi-bin/fossil.cgi instead of http://example.com/cgi-bin/fossil.cgi/REPOSITORY), I get a website with the following error:

Server Error (500): Premature end of script headers: fossil.cgi

A fossil.core dump file is created, and the following error is logged to the webserver error log:

[Tue Aug 01 01:01:01 2014] [error] [client 000.000.000.000] Assertion failed: (fossil_strcmp(&zRepo[j], ".fossil")==0), function process_one_web_page, file ./src/main.c, line 1324., referer: http://example.com/cgi-bin/

Redirection to the error page works fine if the repository was not found, or the repository file is invalid, so I feel there should be similar error handling for the case when the repository name is omitted.

Comments (2)

nobody 12 years ago

I'm running fossil through the following CGI script, and everything works as expected:

#!/var/webs/www.example.com/public_html/cgi-bin/fossil
directory: /var/webs/www.example.com/public_html/fossil/

repository: /var/webs/www.example.com/public_html/fossil/PROJECT.fossil

notfound: http://example.com/fossil-notfound.html

However, when navigating to the CGI script without indicating a repository name in the URL (i.e. just http://example.com/cgi-bin/fossil.cgi instead of http://example.com/cgi-bin/fossil.cgi/REPOSITORY), I get a website with the following error:

Server Error (500): Premature end of script headers: fossil.cgi

A fossil.core dump file is created, and the following error is logged to the webserver error log:

[Tue Aug 01 01:01:01 2014] [error] [client 000.000.000.000] Assertion failed: (fossil_strcmp(&zRepo[j], ".fossil")==0), function process_one_web_page, file ./src/main.c, line 1324., referer: http://example.com/cgi-bin/

Redirection to the error page works fine if the repository was not found, or the repository file is invalid, so I feel there should be similar error handling for the case when the repository name is omitted.

nobody 12 years ago

Thank you very much for the quick fix!

Keyboard Shortcuts

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