]> granicus.if.org Git - python/commit
[3.8] bpo-21315: Fix parsing of encoded words with missing leading ws (GH-13425)...
authorAshwin Ramaswami <aramaswamis@gmail.com>
Tue, 3 Sep 2019 17:08:39 +0000 (10:08 -0700)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 3 Sep 2019 17:08:39 +0000 (10:08 -0700)
commit59e8fba7189d0e86d428a1125744afb8b0f40b5d
treedd7c247e36f0684255552d7b06a7ca955b041394
parent58067d2cf6e81187f9782aff03cc8bec3d878778
[3.8] bpo-21315: Fix parsing of encoded words with missing leading ws (GH-13425) (GH-15655)

* [bpo-21315](https://bugs.python.org/issue21315): 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](https://bugs.python.org/issue21315).
(cherry picked from commit 66c4f3f38b867d8329b28c032bb907fd1a2f22d2)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
(cherry picked from commit dc20fc4311dece19488299a7cd11317ffbe4d3c3)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
https://bugs.python.org/issue21315
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]