]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-21315: Fix parsing of encoded words with missing leading ws. (GH-13425) (#13846)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 6 Jun 2019 17:08:43 +0000 (10:08 -0700)
committerBarry Warsaw <barry@python.org>
Thu, 6 Jun 2019 17:08:43 +0000 (10:08 -0700)
commitdc20fc4311dece19488299a7cd11317ffbe4d3c3
tree9e043510ac8ebbf562cc313e9d7bfe1ceb7c2577
parent28be388e69c6e88d5c04abcc714db5ec526e4f5e
bpo-21315: Fix parsing of encoded words with missing leading ws. (GH-13425) (#13846)

* bpo-21315: Fix parsing of encoded words with missing leading ws.

Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.

Missing trailing whitespace around encoded word now register a defect
instead.

Original patch suggestion by David R. Murray on bpo-21315.
(cherry picked from commit 66c4f3f38b867d8329b28c032bb907fd1a2f22d2)

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
Lib/test/test_email/test_headerregistry.py
Misc/NEWS.d/next/Library/2019-05-19-10-48-46.bpo-21315.PgXVqF.rst [new file with mode: 0644]