2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-03 16:07:00 +00:00

Ensure the filename cannot have path traversal in XCC2 and older

This commit is contained in:
Jarrod Johnson
2026-07-01 20:42:22 -04:00
parent 57a4c840cb
commit ae290c4419
2 changed files with 2 additions and 2 deletions
@@ -1348,7 +1348,7 @@ class XCCClient(IMMClient):
{'Generate_FFDC_status': 1})
url = '/ffdc/{0}'.format(result['FileName'])
if autosuffix and not savefile.endswith('.tzz'):
savefile += '-{0}'.format(result['FileName'])
savefile += '-{0}'.format(os.path.basename(result['FileName']))
fd = webclient.make_downloader(wc, url, savefile)
while not fd.completed():
try:
@@ -1644,7 +1644,7 @@ class OEMHandler(generic.OEMHandler):
{'Generate_FFDC_status': 1})
url = '/ffdc/{0}'.format(result['FileName'])
if autosuffix and not savefile.endswith('.tzz'):
savefile += '-{0}'.format(result['FileName'])
savefile += '-{0}'.format(os.path.basename(result['FileName']))
fd = webclient.make_downloader(wc, url, savefile)
while not fd.completed():
try: