cpython/Lib/test/test_email
Ashwin Ramaswami ea21389dda [3.7] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15654)
…aders. (GH-15239)

Fixes a case in which email._header_value_parser.get_unstructured hangs the system for some invalid headers. This covers the cases in which the header contains either:
- a case without trailing whitespace
- an invalid encoded word

https://bugs.python.org/issue37764

This fix should also be backported to 3.7 and 3.8

https://bugs.python.org/issue37764
(cherry picked from commit c5b242f87f)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>





https://bugs.python.org/issue37764
2019-09-03 09:42:53 -07:00
..
data
__init__.py
__main__.py
test__encoded_words.py bpo-27397: Make email module properly handle invalid-length base64 strings (GH-7583) (GH-7664) 2018-06-12 16:46:11 +03:00
test__header_value_parser.py [3.7] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15654) 2019-09-03 09:42:53 -07:00
test_asian_codecs.py
test_contentmanager.py
test_defect_handling.py bpo-27397: Make email module properly handle invalid-length base64 strings (GH-7583) (GH-7664) 2018-06-12 16:46:11 +03:00
test_email.py [3.7] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15654) 2019-09-03 09:42:53 -07:00
test_generator.py bpo-34424: Handle different policy.linesep lengths correctly. (GH-8803) 2019-05-13 19:02:46 -07:00
test_headerregistry.py bpo-37482: Fix email address name with encoded words and special chars (GH-14561) 2019-08-21 16:21:48 -07:00
test_inversion.py
test_message.py [3.7] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. (GH-14119) (GH-14381) 2019-06-25 11:40:41 -07:00
test_parser.py
test_pickleable.py
test_policy.py Fix infinite loop in email folding logic (GH-12732) 2019-07-16 11:15:40 -07:00
test_utils.py bpo-35317: Fix mktime() error in test_email (GH-10721) 2018-11-27 03:57:56 -08:00
torture_test.py