Commits

Anonymous committed abdab9c

Allow relative paths in hg-ssh.

Comments (0)

Files changed (1)

     if len(repo) == 0:
         fail("invalid repository path")
     repo = repodir + '/' + repo
-    if  repo.find('"') != -1 or repo.find('/.') != -1:
+    repo = os.path.abspath(repo)
+    if repo.find('"') != -1 or repo.find('/.') != -1 or repo.find(repodir) != 0:
         fail("invalid repository path")
-    repo = os.path.abspath(repo)
     return (cmd, repo)
 
 def serve_impl(user, repo, repodir):