]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32178: Fix IndexError trying to parse 'To' header starting with ':'. (GH-15044)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 11 Aug 2019 21:05:37 +0000 (14:05 -0700)
committerGitHub <noreply@github.com>
Sun, 11 Aug 2019 21:05:37 +0000 (14:05 -0700)
commitdec231a73c2a463b29f19c4e8357602c10a68856
tree2b594e7e6c980d469405b5c92ce5fa613913135b
parentc48d606adcef395e59fd555496c42203b01dd3e8
bpo-32178: Fix IndexError trying to parse 'To' header starting with ':'. (GH-15044)

This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string.

https://bugs.python.org/issue32178
(cherry picked from commit 09a1872a8007048dcdf825a476816c5e3498b8f8)

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-07-30-22-41-05.bpo-32178.X-IFLe.rst [new file with mode: 0644]