]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 9 Dec 2019 02:12:50 +0000 (18:12 -0800)
committerGitHub <noreply@github.com>
Mon, 9 Dec 2019 02:12:50 +0000 (18:12 -0800)
commit2abd3a8f580e6c7b1ce88b2ae9f9a783f4aea5d3
treefa0a5235b5e76c5548cc961b70dab10adda146ea
parentf66f4a09d0b6817fe6a86a567fd506aa223f1563
bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)

Fix a potential IndexError when passing an empty value to the message-id
parser. Instead, HeaderParseError should be raised.
(cherry picked from commit 3ae4ea1931361dd2743e464790e739d9285501bf)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
Lib/email/_header_value_parser.py
Lib/test/test_email/test__header_value_parser.py
Misc/NEWS.d/next/Library/2019-12-07-22-25-39.bpo-38708.rZTUfk.rst [new file with mode: 0644]