]> granicus.if.org Git - python/commit
Fix infinite loop in email folding logic (GH-12732)
authorPaul Ganssle <pganssle@users.noreply.github.com>
Tue, 16 Jul 2019 17:50:01 +0000 (19:50 +0200)
committerBarry Warsaw <barry@python.org>
Tue, 16 Jul 2019 17:50:01 +0000 (10:50 -0700)
commitf69d5c61981ea97d251db515c7ff280fcc17182d
tree528eba8e080d37ec15085068f36fefd75ecbcb3a
parent1d8b04edfdc3030e645730492bfcc27b75718b96
Fix infinite loop in email folding logic (GH-12732)

As far as I can tell, this infinite loop would be triggered if:

1. The value being folded contains a single word (no spaces) longer than
   max_line_length
2. The max_line_length is shorter than the encoding's name + 9
   characters.

bpo-36564: https://bugs.python.org/issue36564
Lib/email/_header_value_parser.py
Lib/email/parser.py
Lib/test/test_email/test_policy.py
Misc/NEWS.d/next/Library/2019-04-08-13-00-13.bpo-36564._n67m_.rst [new file with mode: 0644]