fix: Download old samples was broken.

pull/175/head
Raphaël Vinot 2018-01-10 23:39:27 +01:00
parent 6c21728e04
commit baa617aae4
1 changed files with 1 additions and 1 deletions

View File

@ -1147,7 +1147,7 @@ class PyMISP(object):
zipped = BytesIO(decoded)
try:
archive = zipfile.ZipFile(zipped)
if f.get('md5'):
if f.get('md5') and f['md5'] in archive.infolist():
# New format
unzipped = BytesIO(archive.open(f['md5'], pwd=b'infected').read())
else: