cpython/Lib/test/test_email
R. David Murray a4ef689ce6
[3.10] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (GH-129111)
Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit 5aaf416858)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-04-03 18:58:22 +02:00
..
data Optimize images by IMGbot (GH-21348) 2022-02-04 16:31:21 +09:00
__init__.py bpo-43651: PEP 597: Fix test_email (GH-25158) 2021-04-05 12:30:12 +09:00
__main__.py
test__encoded_words.py bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137) 2022-04-30 05:31:28 -07:00
test__header_value_parser.py [3.10] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (GH-129111) 2025-04-03 18:58:22 +02:00
test_asian_codecs.py
test_contentmanager.py bpo-41402: Fix email ContentManager calling .encode() on bytes (GH-21631) 2021-08-09 16:44:17 -07:00
test_defect_handling.py
test_email.py [3.10] [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() (GH-111116) (#123768) 2024-09-06 13:14:22 +02:00
test_generator.py [3.10] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122609) 2024-09-04 17:38:31 +02:00
test_headerregistry.py bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137) 2022-04-30 05:31:28 -07:00
test_inversion.py bpo-30681: Support invalid date format or value in email Date header (GH-22090) 2020-10-26 17:31:06 -07:00
test_message.py [3.10] Fix typos in the Lib directory (GH-28775) (GH-28804) 2021-10-07 11:49:47 -04:00
test_parser.py
test_pickleable.py
test_policy.py [3.10] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122609) 2024-09-04 17:38:31 +02:00
test_utils.py [3.10] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (#126438) 2024-11-05 19:55:43 +00:00
torture_test.py