From 2ef60eada5cd66db9095a4f40942e8b07a7b3377 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Sep 19 2017 16:52:56 +0000 Subject: 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 --- diff --git a/koji/daemon.py b/koji/daemon.py index 1947dd3..533ae1a 100644 --- a/koji/daemon.py +++ b/koji/daemon.py @@ -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]