]> granicus.if.org Git - python/commit
bpo-29412: Fix indexError when parsing a header value ending unexpectedly (GH-14387...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Jun 2019 22:05:36 +0000 (15:05 -0700)
committerBarry Warsaw <barry@python.org>
Wed, 26 Jun 2019 22:05:36 +0000 (15:05 -0700)
commit82654a037211a3466a294d53952926fc87f8403d
tree45a1c38b23e52963954dc0308b6d64e290e93fb5
parent04d4692579cc4e0204c7fbced3692f8aa4bbb857
bpo-29412: Fix indexError when parsing a header value ending unexpectedly (GH-14387) (GH-14411)

* patched string index out of range error in get_word function of _header_value_parser.py and created tests in test__header_value_parser.py for CFWS.
* Raise HeaderParseError instead of continuing when parsing a word.
(cherry picked from commit 7213df7bbfd85378c6e42e1ac63144d5974bdcf6)

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
Misc/NEWS.d/next/Library/2019-06-25-19-27-25.bpo-29412.n4Zqdh.rst [new file with mode: 0644]