]> granicus.if.org Git - python/commitdiff
Backport 58618:
authorNeal Norwitz <nnorwitz@gmail.com>
Wed, 24 Oct 2007 03:52:50 +0000 (03:52 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Wed, 24 Oct 2007 03:52:50 +0000 (03:52 +0000)
Issue 1307 by Derek Shockey, fix the same bug for RCPT.

Lib/smtpd.py

index 4aa34763ecff0a2fa84af1d3561666ba2939e3ef..e09774f2d9bdfed0260456fb824cc5a1c3dee21d 100755 (executable)
@@ -237,7 +237,7 @@ class SMTPChannel(asynchat.async_chat):
         if not self.__mailfrom:
             self.push('503 Error: need MAIL command')
             return
-        address = self.__getaddr('TO:', arg)
+        address = self.__getaddr('TO:', arg) if arg else None
         if not address:
             self.push('501 Syntax: RCPT TO: <address>')
             return