mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
Merged revisions 76730 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r76730 | r.david.murray | 2009-12-09 21:08:06 -0500 (Wed, 09 Dec 2009) | 20 lines 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. ........ ................
This commit is contained in:
parent
1ba778dea1
commit
a6cdd83f7f
3 changed files with 199 additions and 3 deletions
|
@ -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__:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue