cpython/Lib/email
Paresh Joshi 07eff899d8
gh-142006: Fix HeaderWriteError in email.policy.default caused by extra newline (#142008)
RDM: This fixes a subtle folding error that showed up when a token exactly filled a line and was followed by whitespace and a token with no folding whitespace that was longer than a line.  In this particular circumstance the whitespace after the first token got pushed on to the next line, and then stolen to go in front of the next unfoldable token...leaving a completely empty line in the line buffer.  That line got turned in to a newline, which is RFC illegal, and the newish security check caught it.  The fix is to just delete that empty line from the buffer.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-12-06 15:59:35 -05:00
..
mime gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
__init__.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
_encoded_words.py bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137) 2022-04-30 13:17:23 +03:00
_header_value_parser.py gh-142006: Fix HeaderWriteError in email.policy.default caused by extra newline (#142008) 2025-12-06 15:59:35 -05:00
_parseaddr.py gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
_policybase.py gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
architecture.rst Fix typos in multiple .rst files (#1668) 2017-05-19 23:37:57 +03:00
base64mime.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
charset.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
contentmanager.py gh-135307: Fix email error when policy max_line_length is set to 0 or None (#135367) 2025-11-02 09:32:14 -05:00
encoders.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
errors.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
feedparser.py gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
generator.py gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
header.py gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (#92900) 2025-06-15 15:29:38 -04:00
headerregistry.py bpo-26579: Add object.__getstate__(). (GH-2821) 2022-04-06 20:00:14 +03:00
iterators.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
message.py gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
parser.py gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435) 2025-11-04 14:46:07 -05:00
policy.py gh-127794: Validate email header names according to RFC 5322 (#127820) 2025-03-30 12:29:29 +00:00
quoprimime.py gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
utils.py gh-136702: Deprecate passing non-ascii *encoding* (str) to encodings.normalize_encoding (#140030) 2025-11-09 13:37:34 +01:00