Skip to content
Snippets Groups Projects
Commit b4f16bf5 authored by Thomas Arendsen Hein's avatar Thomas Arendsen Hein
Browse files

hgweb: Added safety net for PATH_INFO starting with double slash.

This happens e.g. when using the following apache config:
  RewriteRule (.*) /hgwebdir/$1 [PT]
instead of the less readable (but more correct):
  RewriteRule (.*) /hgwebdir$1 [PT]
parent 03880d4e
No related branches found
No related tags found
No related merge requests found
......@@ -660,6 +660,8 @@
pi = req.env.get('PATH_INFO')
if pi:
while pi.startswith('//'):
pi = pi[1:]
if pi.startswith(base):
if len(pi) > len(base):
base += '/'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment