Commit e8c48e9f authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files Relax path validation

Make the terminating slash in repository URLs optional.

Signed-off-by: default avatarLukas Fleischer <>
parent 289ff0c7
......@@ -26,9 +26,12 @@ ssh_cmdline = config.get('serve', 'ssh-cmdline')
def repo_path_validate(path):
if not path.startswith(repo_base_path):
return False
if not path.endswith('.git/'):
if path.endswith('.git'):
repo = path[len(repo_base_path):-4]
elif path.endswith('.git/'):
repo = path[len(repo_base_path):-5]
return False
repo = path[len(repo_base_path):-5]
return re.match(repo_regex, repo)
def repo_path_get_pkgbase(path):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment