# HG changeset patch # User Benoit Boissinot # Date 1160750098 -7200 # Node ID 80721b86a448a9dba58b74603eb0c9673baa597b # Parent bb9852b3bf06d9ef027849eb8bfe92f1b8d48bd2 hgweb: fix path cleaning diff -r bb9852b3bf06 -r 80721b86a448 mercurial/hgweb/hgweb_mod.py --- 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."):