]> granicus.if.org Git - python/commit
bpo-21315: Fix parsing of encoded words with missing leading ws. (#13425)
authorAbhilash Raj <maxking@users.noreply.github.com>
Wed, 5 Jun 2019 16:56:33 +0000 (12:56 -0400)
committerBarry Warsaw <barry@python.org>
Wed, 5 Jun 2019 16:56:33 +0000 (09:56 -0700)
commit66c4f3f38b867d8329b28c032bb907fd1a2f22d2
treebed2fe319cf50ffbc6d2ac2c89d5f167df4e9d48
parent142566c028720934325f0b7fe28680afd046e00f
bpo-21315: Fix parsing of encoded words with missing leading ws. (#13425)

* 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.
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]