cpython/Lib/email
R. David Murray a3c0a809e1
[3.13] gh-144156: Fix email header folding concatenating encoded words (GH-144692) (#145195)
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 0f7cd5544a)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-02-24 15:55:54 -05:00
..
mime
__init__.py
_encoded_words.py [3.13] Correctly fold unknown-8bit originating from encoded words. (GH-142517) (#143147) 2025-12-24 13:19:28 -05:00
_header_value_parser.py [3.13] gh-144156: Fix email header folding concatenating encoded words (GH-144692) (#145195) 2026-02-24 15:55:54 -05:00
_parseaddr.py
_policybase.py
architecture.rst
base64mime.py
charset.py
contentmanager.py
encoders.py
errors.py
feedparser.py [3.13] gh-68552: fix defects policy (GH-138579) (#142367) 2025-12-09 07:39:03 +00:00
generator.py [3.13] gh-144125: email: verify headers are sound in BytesGenerator (#144181) 2026-01-25 17:09:26 +00:00
header.py
headerregistry.py [3.13] gh-79986: Add parsing for References/In-Reply-To email headers (GH-137201) (#142574) 2025-12-21 14:36:23 -05:00
iterators.py
message.py [3.13] gh-136063: fix quadratic-complexity parsing in email.message._parseparam (GH-136072) (#140828) 2025-11-30 14:34:22 +02:00
parser.py
policy.py
quoprimime.py
utils.py