sanity check volume field for uploads
This commit is contained in:
parent
2d17c000ca
commit
ce4747f695
1 changed files with 3 additions and 0 deletions
|
|
@ -12283,6 +12283,9 @@ def get_upload_path(reldir, name, create=False, volume=None):
|
|||
reldir = os.path.normpath(reldir)
|
||||
if not reldir or reldir.startswith('..'):
|
||||
raise koji.GenericError("Invalid upload directory: %s" % orig_reldir)
|
||||
if volume is not None:
|
||||
# make sure the volume is valid
|
||||
lookup_name('volume', volume, strict=True)
|
||||
parts = reldir.split('/')
|
||||
check_user = True
|
||||
if create and parts[0] == "tasks":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue