diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-12-10 02:08:06 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-12-10 02:08:06 (GMT) |
commit | e8dc258db5898f5bbeb60c6780d1a3cb41585afe (patch) | |
tree | d4da1ddcb5749df406772ed01141e386d736cf92 /Lib/imaplib.py | |
parent | e5fdedbeda147f3878f82349464f28f184c01658 (diff) | |
download | cpython-e8dc258db5898f5bbeb60c6780d1a3cb41585afe.zip cpython-e8dc258db5898f5bbeb60c6780d1a3cb41585afe.tar.gz cpython-e8dc258db5898f5bbeb60c6780d1a3cb41585afe.tar.bz2 |
Merged revisions 76726-76727 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
The merge adds a test with an invalid rather than a missing line end, since
the py3K code passed the original issue 5949 test. New test also by Scott
Dial.
........
r76726 | r.david.murray | 2009-12-09 10:15:31 -0500 (Wed, 09 Dec 2009) | 6 lines
Issue 5949: fixed IMAP4_SSL hang when the IMAP server response is
missing proper end-of-line termination. Patch and tests by
Scott Dial. The new tests include a test harness which will
make it easier to add additional tests.
........
r76727 | r.david.murray | 2009-12-09 11:41:39 -0500 (Wed, 09 Dec 2009) | 2 lines
Skip new imaplib SSL tests if ssl is not available.
........
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index df35cb1..f803a5c 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -1023,6 +1023,8 @@ class IMAP4: raise self.abort('socket error: EOF') # Protocol mandates all lines terminated by CRLF + if not line.endswith(b'\r\n'): + raise self.abort('socket error: unterminated line') line = line[:-2] if __debug__: |