summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-17 09:52:53 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-17 09:52:53 (GMT)
commitbd3bc4dc4c18cd1b3f1ce0dd2065bbed6de4f267 (patch)
tree78a7150ec4155f20e8a43be78b58743003a08302 /Lib
parent0e1abe2a07444d35d3f97737201787f9722866b8 (diff)
downloadcpython-bd3bc4dc4c18cd1b3f1ce0dd2065bbed6de4f267.zip
cpython-bd3bc4dc4c18cd1b3f1ce0dd2065bbed6de4f267.tar.gz
cpython-bd3bc4dc4c18cd1b3f1ce0dd2065bbed6de4f267.tar.bz2
Bug #1430298: It is now possible to send a mail with an empty
return address using smtplib.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/smtplib.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 57605a9..71d25fd 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -175,8 +175,11 @@ def quoteaddr(addr):
except AttributeError:
pass
if m == (None, None): # Indicates parse failure or AttributeError
- #something weird here.. punt -ddm
+ # something weird here.. punt -ddm
return "<%s>" % addr
+ elif m is None:
+ # the sender wants an empty return address
+ return "<>"
else:
return "<%s>" % m