]> 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:03:24 +0000 (10:03 -0700)
committerGitHub <noreply@github.com>
Sat, 12 Oct 2019 17:03:24 +0000 (10:03 -0700)
commite540bb546163f108c7c304f2e6865efaa78cd4c2
tree1b0e2708798443858100a7b42181eaa47df93af3
parent5a638a805503131f4a9cc2bbc5944611295c1500
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]