-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
If an email message with attachments contain a boundary with the characters "<--- ... --->" the email.parser module fails to recognize the message as being multipart.
I have attached to this bug report an example mailbox file, and when the following snippet is run on it you will see that is_multipart()
returns False
, although the message is clearly a multipart message.
I found this boundary string used in a real life email I received.
from email.parser import Parser
# Create parser instance
P = Parser()
with open("message-error.mbox") as f:
msg = P.parse(f)
print(msg.is_multipart())
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
LamentXU123
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error