Commit 20b89040 authored by Neal Norwitz's avatar Neal Norwitz

Backport 58594:

Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
parent eef61b76
...@@ -221,7 +221,7 @@ class SMTPChannel(asynchat.async_chat): ...@@ -221,7 +221,7 @@ class SMTPChannel(asynchat.async_chat):
def smtp_MAIL(self, arg): def smtp_MAIL(self, arg):
print >> DEBUGSTREAM, '===> MAIL', arg print >> DEBUGSTREAM, '===> MAIL', arg
address = self.__getaddr('FROM:', arg) address = self.__getaddr('FROM:', arg) if arg else None
if not address: if not address:
self.push('501 Syntax: MAIL FROM:<address>') self.push('501 Syntax: MAIL FROM:<address>')
return return
......
...@@ -32,6 +32,8 @@ Core and builtins ...@@ -32,6 +32,8 @@ Core and builtins
Library Library
------- -------
- Bug #1307: Fix smtpd so it doesn't raise an exception when there is no arg.
- ctypes will now work correctly on 32-bit systems when Python is - ctypes will now work correctly on 32-bit systems when Python is
configured with --with-system-ffi. configured with --with-system-ffi.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment