diff mercurial/hgweb/webutil.py @ 39471:15e8250a82da

hgweb: do not audit URL path as working-directory path Since hgweb is an interface to repository data, we don't need to prohibit any paths conflicting within the filesystem. Still an access to working files is audited by filectx.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 26 Aug 2018 22:18:09 +0900
parents d7e6e109eaae
children 4f44f747f094
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py	Sun Aug 26 22:23:25 2018 +0900
+++ b/mercurial/hgweb/webutil.py	Sun Aug 26 22:18:09 2018 +0900
@@ -320,7 +320,8 @@
 
 def cleanpath(repo, path):
     path = path.lstrip('/')
-    return pathutil.canonpath(repo.root, '', path)
+    auditor = pathutil.pathauditor(repo.root, realfs=False)
+    return pathutil.canonpath(repo.root, '', path, auditor=auditor)
 
 def changectx(repo, req):
     changeid = "tip"