Port fix for CVE-2016-0772 from upstream

This commit is contained in:
Kovid Goyal 2016-07-05 09:13:59 +05:30
parent 51b245e1bb
commit 0b86d5175a

View File

@ -651,6 +651,11 @@ class SMTP:
self.ehlo_resp = None
self.esmtp_features = {}
self.does_esmtp = 0
else:
# RFC 3207:
# 501 Syntax error (no parameters allowed)
# 454 TLS not available due to temporary reason
raise SMTPResponseException(resp, reply)
return (resp, reply)
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],