Skip to content

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

Merged
bitdancer merged 1 commit into
python:3.14from
miss-islington:backport-0f7cd55-3.14
Feb 19, 2026
Merged

bitdancer merged 1 commit into
python:3.14from
miss-islington:backport-0f7cd55-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

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)

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

…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>
@miss-islington
miss-islington requested a review from a team as a code owner February 19, 2026 18:33
@bitdancer
bitdancer merged commit 1404a4d into python:3.14 Feb 19, 2026
47 checks passed
@miss-islington
miss-islington deleted the backport-0f7cd55-3.14 branch February 19, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants