mirror of https://github.com/MISP/PyMISP
fix: message_from_bytes really dislikes newline at the beginning of a mail
parent
85ac1b0e6a
commit
54d38df6dc
|
@ -45,7 +45,7 @@ class EMailObject(AbstractMISPObjectGenerator):
|
|||
|
||||
def parse_email(self) -> EmailMessage:
|
||||
"""Convert email into EmailMessage."""
|
||||
content_in_bytes = self.__pseudofile.getvalue()
|
||||
content_in_bytes = self.__pseudofile.getvalue().strip()
|
||||
eml = message_from_bytes(content_in_bytes,
|
||||
_class=EmailMessage,
|
||||
policy=policy.default)
|
||||
|
|
Loading…
Reference in New Issue