This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年02月19日 19:53 by giampaolo.rodola, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| smptlib.diff | giampaolo.rodola, 2008年02月19日 19:53 | |||
| Messages (3) | |||
|---|---|---|---|
| msg62569 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2008年02月19日 19:53 | |
By looking through the smtplib module code I think I've found a potential issue in the SSLFakeFile class code since there's a while loop which is supposed to be stopped only when the "\n" character is encountered: def readline(self): str = "" chr = None while chr != "\n": chr = self.sslobj.read(1) str += chr return str The patch in attachment just adds a break statement to prevent the while loop to hang forever in case the "\n" character is never encountered. |
|||
| msg62805 - (view) | Author: Rafael Zanella (zanella) | Date: 2008年02月23日 20:04 | |
As of 2.6 the smtplib uses the ssl module, until 2.5 it uses _ssl, I *think* that this issue would bring an Exception on 2.5 while on 2.6 would return a zero length string: """ def read(self, len=1024): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" return self._sslobj.read(len) """ wich would fulfill the "if not chr:" |
|||
| msg64135 - (view) | Author: Sean Reifschneider (jafo) * (Python committer) | Date: 2008年03月20日 00:48 | |
ssl.SSLSocket.read() says: Return zero-length string on EOF. So, I'm going to apply this patch. Applied in rev 61656. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:30 | admin | set | github: 46396 |
| 2008年03月20日 00:52:18 | jafo | set | status: open -> closed resolution: accepted |
| 2008年03月20日 00:48:53 | jafo | set | priority: normal keywords: + patch messages: + msg64135 nosy: + jafo |
| 2008年02月23日 20:04:15 | zanella | set | nosy:
+ zanella messages: + msg62805 |
| 2008年02月19日 19:53:03 | giampaolo.rodola | create | |