diff options
author | Tommi Virtanen <tv@eagain.net> | 2008-03-19 21:49:47 +0200 |
---|---|---|
committer | Tommi Virtanen <tv@eagain.net> | 2008-03-19 21:55:19 +0200 |
commit | 4d8ba7788d10e62928404b0272de241580e00e92 (patch) | |
tree | 7f03923a420c81c8a78930d574cc8a7283248dae /gitosis/serve.py | |
parent | Make serve acceptable path unit tests more careful. (diff) | |
download | gitosis-dakkar-4d8ba7788d10e62928404b0272de241580e00e92.tar.gz gitosis-dakkar-4d8ba7788d10e62928404b0272de241580e00e92.tar.bz2 gitosis-dakkar-4d8ba7788d10e62928404b0272de241580e00e92.zip |
Allow absolute paths in repo paths, treat them as relative.
As the only convenient way to use non-standard SSH ports with git is
via the ssh://user@host:port/path syntax, and that syntax forces
absolute urls, just force convert absolute paths to relative paths;
you'll never really want absolute paths via gitosis, anyway.
Diffstat (limited to 'gitosis/serve.py')
-rw-r--r-- | gitosis/serve.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitosis/serve.py b/gitosis/serve.py index 0f9cb5c..37ad97f 100644 --- a/gitosis/serve.py +++ b/gitosis/serve.py @@ -15,7 +15,7 @@ from gitosis import gitdaemon from gitosis import app from gitosis import util -ALLOW_RE = re.compile("^'(?P<path>[a-zA-Z0-9][a-zA-Z0-9@._-]*(/[a-zA-Z0-9][a-zA-Z0-9@._-]*)*)'$") +ALLOW_RE = re.compile("^'/*(?P<path>[a-zA-Z0-9][a-zA-Z0-9@._-]*(/[a-zA-Z0-9][a-zA-Z0-9@._-]*)*)'$") COMMANDS_READONLY = [ 'git-upload-pack', |