Run normpath over SCM url when checking against allowed
This will make sure that when we check the allowed SCM url, any ./ and ../ are resolved. Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
8bb44e794c
commit
2ef60eada5
1 changed files with 2 additions and 0 deletions
|
|
@ -263,6 +263,8 @@ class SCM(object):
|
|||
elif len(userhost) > 2:
|
||||
raise koji.GenericError('Invalid username@hostname specified: %s' % netloc)
|
||||
|
||||
path = os.path.normpath(path)
|
||||
|
||||
# ensure that path and query do not end in /
|
||||
if path.endswith('/'):
|
||||
path = path[:-1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue