]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 12 Oct 2019 17:02:23 +0000 (10:02 -0700)
committerGitHub <noreply@github.com>
Sat, 12 Oct 2019 17:02:23 +0000 (10:02 -0700)
commitfebe359559781019c0c8432a2f768809d00af6af
tree0d7807aebf421f77724108bfeb57c3cb355466cd
parentcb580d6fa8349acff723a7a044181d896d076871
bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503)

KeyError should cause a failure in parsing the encoded word and should be caught and raised as a _InvalidEWError instead.
(cherry picked from commit 65dcc8a8dc41d3453fd6b987073a5f1b30c5c0fd)

Co-authored-by: Andrei Troie <andreitroie90@gmail.com>
Lib/email/_header_value_parser.py
Lib/test/test_email/test__encoded_words.py
Lib/test/test_email/test__header_value_parser.py
Misc/NEWS.d/next/Library/2019-10-05-02-07-52.bpo-38332.hwrPN7.rst [new file with mode: 0644]