fix: Add extension in case the attachment has no name.

tests
Raphaël Vinot 2018-05-07 10:53:40 +02:00
parent e713ab2939
commit 48f3f9eea0
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class Mail2MISP():
# Create file objects for the attachments
for attachment_name, attachment in email_object.attachments:
if not attachment_name:
attachment_name = 'NameMissing'
attachment_name = 'NameMissing.txt'
f_object, main_object, sections = make_binary_objects(pseudofile=attachment, filename=attachment_name, standalone=False)
self.misp_event.add_object(f_object)
if main_object: