This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author forest
Recipients barry, forest, r.david.murray
Date 2015-11-25.00:04:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448409876.66.0.930152855615.issue25728@psf.upfronthosting.co.za>
In-reply-to
Content
When a multipart message erroneously defines a boundary string that conflicts with an inner message's boundary string, the parser ignores the (correct) inner message's boundary, and treats all matching boundary lines as if they belong to the (defective) outer message.

This file from the test_email suite demonstrates the problem:
Python-3.5.0/Lib/test/test_email/data/msg_15.txt

Consequentially, the inner multipart/alternative message is parsed with is_multipart() returning False, and a truncated payload.

Moreover, unit tests like test_same_boundary_inner_outer() expect to find the StartBoundaryNotFoundDefect defect on the inner message in that file, which seems wrong to me, since the inner message is not defective.  According to the RFCs, the outer message should have been generated with a boundary string that does not appear anywhere in its encoded body (including the inner message).  The outer message is therefore the defective one.
History
Date User Action Args
2015-11-25 00:04:36forestsetrecipients: + forest, barry, r.david.murray
2015-11-25 00:04:36forestsetmessageid: <1448409876.66.0.930152855615.issue25728@psf.upfronthosting.co.za>
2015-11-25 00:04:36forestlinkissue25728 messages
2015-11-25 00:04:36forestcreate