Fossil SCM
Server Error (500) with missing repository name
c481aa2fdbc67b7…
· opened 11 years, 7 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Minor
- Resolution
- Fixed
- Subsystem
- —
- Created
- Aug. 12, 2014 9:52 a.m.
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)
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.
Thank you very much for the quick fix!