mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 10:36:17 +01:00
Merge pull request #797 from lethliel/fix_1122675
fix security issue (bsc#1122675) no / in filename
This commit is contained in:
commit
fdcd606122
@ -179,8 +179,11 @@ class Fetcher:
|
||||
print('Unsupported file type: ', tmpfile, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
canonname = pac_obj.binary
|
||||
decoded_canonname = decode_it(canonname)
|
||||
if b'/' in canonname or '/' in decoded_canonname:
|
||||
raise oscerr.OscIOError(None, 'canonname contains a slash')
|
||||
|
||||
fullfilename = os.path.join(destdir, decode_it(canonname))
|
||||
fullfilename = os.path.join(destdir, decoded_canonname)
|
||||
if pac_obj is not None:
|
||||
pac_obj.canonname = canonname
|
||||
pac_obj.fullfilename = fullfilename
|
||||
|
Loading…
Reference in New Issue
Block a user