From: Giampaolo RodolĂ  Date: Sat, 21 Aug 2010 18:47:59 +0000 (+0000) Subject: revert changes made in r84236 committed by accident X-Git-Tag: v3.2a2~185 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fe9cd53b2cd38c1098b4176f1273998153f7e65;p=thirdparty%2FPython%2Fcpython.git revert changes made in r84236 committed by accident --- diff --git a/Lib/smtpd.py b/Lib/smtpd.py index e8459f09209e..bd764cc51f40 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -414,20 +414,7 @@ class SMTPServer(asyncore.dispatcher): localaddr, remoteaddr), file=DEBUGSTREAM) def handle_accept(self) - try: - conn, addr = self.accept() - except TypeError: - # sometimes accept() might return None - return - except socket.error, err: - # ECONNABORTED might be thrown - if err[0] != errno.ECONNABORTED: - raise - return - else: - # sometimes addr == None instead of (ip, port) - if addr == None: - return + conn, addr = self.accept() print('Incoming connection from %s' % repr(addr), file=DEBUGSTREAM) channel = self.channel_class(self, conn, addr) diff --git a/Misc/NEWS b/Misc/NEWS index 6552a799493a..019cd4b9dafb 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -117,9 +117,6 @@ Extensions Library ------- -- Issue #9129: smtpd.py module is vulnerable to DoS attacks due to missing - error handling when accepting new connections. - - Issue #843590: Make "macintosh" an alias to the "mac_roman" encoding. - Create os.fsdecode(): decode from the filesystem encoding with