Skip to content

Comments

[3.13] gh-144156: Fix email header folding concatenating encoded words (GH-144692)#145195

Merged
bitdancer merged 1 commit intopython:3.13from
bitdancer:backport-0f7cd55-3.13
Feb 24, 2026
Merged

[3.13] gh-144156: Fix email header folding concatenating encoded words (GH-144692)#145195
bitdancer merged 1 commit intopython:3.13from
bitdancer:backport-0f7cd55-3.13

Conversation

@bitdancer
Copy link
Member

@bitdancer bitdancer commented Feb 24, 2026

The fix for gh-92081 (gh-92281) was unfortunately flawed, and broke whitespace handling for encoded word patterns that had previously been working correctly but had no corresponding tests, unfortunately in a way that made the resulting headers not RFC compliant, in such a way that Yahoo started rejecting the resulting emails. This fix was released in 3.14 alpha 1, 3.13 beta 2 and 3.12.5. This PR fixes the original problem in a way that does not break anything, and in fact fixes a small pre-existing bug (a spurious whitespace after the ':' of the header label if the header value is immediately wrapped on to the next line). (RDM)
(cherry picked from commit 0f7cd55)

…d words (pythonGH-144692)

The fix for pythongh-92081 (pythongh-92281) was unfortunately flawed, and broke whitespace handling for encoded word patterns that had previously been working correctly but had no corresponding tests, unfortunately in a way that made the resulting headers not RFC compliant, in such a way that Yahoo started rejecting the resulting emails.  This fix was released in 3.14 alpha 1, 3.13 beta 2 and 3.12.5.   This PR fixes the original problem in a way that does not break anything, and in fact fixes a small pre-existing bug (a spurious whitespace after the ':' of the header label if the header value is immediately wrapped on to the next line).  (RDM)
(cherry picked from commit 0f7cd55)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
@bitdancer bitdancer requested a review from a team as a code owner February 24, 2026 20:24
@bitdancer bitdancer merged commit a3c0a80 into python:3.13 Feb 24, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants