mirror of https://github.com/MISP/PyMISP
fix: Avoid exception when the malware file name contains a "|"
parent
cc6391233c
commit
c921017cf7
|
@ -638,7 +638,7 @@ class MISPAttribute(AbstractMISP):
|
|||
def _prepare_new_malware_sample(self):
|
||||
if '|' in self.value:
|
||||
# Get the filename, ignore the md5, because humans.
|
||||
self.malware_filename, md5 = self.value.split('|')
|
||||
self.malware_filename, md5 = self.value.rsplit('|', 1)
|
||||
else:
|
||||
# Assuming the user only passed the filename
|
||||
self.malware_filename = self.value
|
||||
|
@ -1665,7 +1665,6 @@ class MISPEvent(AbstractMISP):
|
|||
event_report.pop('sharing_group_id', None)
|
||||
to_return['EventReport'].append(event_report.to_dict())
|
||||
|
||||
|
||||
return {'Event': to_return}
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue