]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
revert changes made in r84236 committed by accident
authorGiampaolo Rodolà <g.rodola@gmail.com>
Sat, 21 Aug 2010 18:47:59 +0000 (18:47 +0000)
committerGiampaolo Rodolà <g.rodola@gmail.com>
Sat, 21 Aug 2010 18:47:59 +0000 (18:47 +0000)
Lib/smtpd.py
Misc/NEWS

index e8459f09209e5e9b3deb36fb3fb281573a2b0c30..bd764cc51f409c21d9f79d8d05fad2c1a79ecc7a 100755 (executable)
@@ -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)
 
index 6552a799493aba8849c46b58165c031dc2ee452b..019cd4b9dafb85d653f5533f9b995de650104cdc 100644 (file)
--- 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