gh-135854: Fix function email.message.Message.get_boundary strips boundaries twice - #135891
gh-135854: Fix function email.message.Message.get_boundary strips boundaries twice#135891tanloong wants to merge 7 commits into
email.message.Message.get_boundary strips boundaries twice#135891Conversation
|
Hi all, it's been a month and a half since this PR is created. Could some core dev give this PR a review? Thanks. |
|
This PR is stale because it has been open for 30 days with no activity. |
…/tanloong/cpython into fix-duplicate-boundary-stripping
|
This PR is stale because it has been open for 90 days with no activity. |
|
|
||
| msg = email.message_from_string(textwrap.dedent('''\ | ||
| MIME-Version: 1.0 | ||
| Content-Type: multipart/mixed; boundary=<""> |
There was a problem hiding this comment.
Unfortunately, this is not a valid parameter value. Technically this should in fact fail to be recognized as a multipart. Per rfc 2045, <> characters must be inside quotes to be valid. Any idea what other email programs do with this kind of broken value?
I'm reluctant to apply the proposed fix since it would make valid a boundary specification that is not in fact valid. See my comments on the issue for more.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
email.message.get_boundary() invokes email.message.get_param() and utils.collapse_rfc2231_value(), causing boundaries being stripped twice. This PR passes
unquote=Falsetoemail.message.get_param()to avoid the redundant stripping.