Fossil

View Ticket
Login

View Ticket

Ticket Hash: c481aa2fdbc67b7e0aee4cd370bc505828585945
Title: Server Error (500) with missing repository name
Status: Fixed Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Fixed
Last Modified: 2014-08-15 19:57:10
11.64 years ago
Created: 2014-08-12 09:52:49
11.65 years ago
Version Found In: 1.29 (FreeBSD 9 x86-32)
User Comments:
nobody added on 2014-08-12 09:52:49:

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 added on 2014-08-15 19:57:10:

Thank you very much for the quick fix!