]> granicus.if.org Git - python/commit
bpo-29412: Fix indexError when parsing a header value ending unexpectedly (GH-14387)
authorAbhilash Raj <maxking@users.noreply.github.com>
Wed, 26 Jun 2019 20:13:02 +0000 (13:13 -0700)
committerBarry Warsaw <barry@python.org>
Wed, 26 Jun 2019 20:13:02 +0000 (13:13 -0700)
commit7213df7bbfd85378c6e42e1ac63144d5974bdcf6
tree10034147cc523bf1870d95b1d3c21b13bc462c92
parent2a7d596f27b2342caf168a03c95ebf3b56e5dbbd
bpo-29412: Fix indexError when parsing a header value ending unexpectedly (GH-14387)

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