changeset 3388:80721b86a448

hgweb: fix path cleaning
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 13 Oct 2006 16:34:58 +0200
parents bb9852b3bf06
children c7c6f1a45348
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Fri Oct 13 10:50:35 2006 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Fri Oct 13 16:34:58 2006 +0200
@@ -584,10 +584,7 @@
     # find tag, changeset, file
 
     def cleanpath(self, path):
-        p = util.normpath(path)
-        if p[:2] == "..":
-            raise Exception("suspicious path")
-        return p
+        return util.canonpath(self.repo.root, '', path)
 
     def run(self):
         if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."):