diff -r 463df2986814 -r 052351e3e1cd mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Sat Mar 03 14:21:47 2018 -0500 +++ b/mercurial/hgweb/common.py Sat Mar 03 12:34:35 2018 -0500 @@ -138,7 +138,7 @@ """Determine if a path is safe to use for filesystem access.""" parts = path.split('/') for part in parts: - if (part in ('', os.curdir, os.pardir) or + if (part in ('', os.curdir, pycompat.ospardir) or pycompat.ossep in part or pycompat.osaltsep is not None and pycompat.osaltsep in part): return False