classification
Title: Email multipart boundary detection fails on a wrapped header
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: davidstrauss
Priority: normal Keywords:

Created on 2011-04-27 03:49 by davidstrauss, last changed 2011-04-27 03:55 by davidstrauss. This issue is now closed.

Files
File name Uploaded Description Edit
wrapped_multipart.txt davidstrauss, 2011-04-27 03:50
Messages (3)
msg134523 - (view) Author: David Strauss (davidstrauss) Date: 2011-04-27 03:49
I've attached a multipart message produced by Thunderbird. For some reason, the email.message parser doesn't properly recognize the boundary. This causes legitimate multipart messages to parse as if no boundary were specified. Simply removing the newline on the line starting with " boundary" allows it to parse correctly.

To see why this is valid, refer to section 2.2.3 of RFC2822 [1].

[1] http://tools.ietf.org/html/rfc2822#section-2.2.3
msg134524 - (view) Author: David Strauss (davidstrauss) Date: 2011-04-27 03:50
Replacing the file with a proper example.
msg134525 - (view) Author: David Strauss (davidstrauss) Date: 2011-04-27 03:55
Never mind. I was manipulating some text that broke the parser.
History
Date User Action Args
2011-04-27 03:55:36davidstrausssetstatus: open -> closed
resolution: not a bug
messages: + msg134525
2011-04-27 03:50:20davidstrausssetfiles: + wrapped_multipart.txt

messages: + msg134524
2011-04-27 03:50:00davidstrausssetfiles: - wrapped_multipart.txt
2011-04-27 03:49:16davidstrausscreate