diff options
author | Paul Ganssle <pganssle@users.noreply.github.com> | 2019-07-16 17:50:01 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2019-07-16 17:50:01 (GMT) |
commit | f69d5c61981ea97d251db515c7ff280fcc17182d (patch) | |
tree | 528eba8e080d37ec15085068f36fefd75ecbcb3a /Lib/email/parser.py | |
parent | 1d8b04edfdc3030e645730492bfcc27b75718b96 (diff) | |
download | cpython-f69d5c61981ea97d251db515c7ff280fcc17182d.zip cpython-f69d5c61981ea97d251db515c7ff280fcc17182d.tar.gz cpython-f69d5c61981ea97d251db515c7ff280fcc17182d.tar.bz2 |
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
Diffstat (limited to 'Lib/email/parser.py')
-rw-r--r-- | Lib/email/parser.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Lib/email/parser.py b/Lib/email/parser.py index 555b172..7db4da1 100644 --- a/Lib/email/parser.py +++ b/Lib/email/parser.py @@ -13,7 +13,6 @@ from email.feedparser import FeedParser, BytesFeedParser from email._policybase import compat32 - class Parser: def __init__(self, _class=None, *, policy=compat32): """Parser of RFC 2822 and MIME email messages. |