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
__init__.py
__main__.py
test__encoded_words.py
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
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
test_inversion.py
test_message.py
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