There was an error while loading. Please reload this page.
1 parent 4956dd2 commit 3625f7fCopy full SHA for 3625f7f
2 files changed
Lib/smtplib.py
@@ -680,6 +680,11 @@ def starttls(self, keyfile=None, certfile=None, context=None):
680
self.ehlo_resp = None
681
self.esmtp_features = {}
682
self.does_esmtp = 0
683
+ else:
684
+ # RFC 3207:
685
+ # 501 Syntax error (no parameters allowed)
686
+ # 454 TLS not available due to temporary reason
687
+ raise SMTPResponseException(resp, reply)
688
return (resp, reply)
689
690
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
Misc/NEWS
@@ -35,6 +35,9 @@ Core and Builtins
35
Library
36
-------
37
38
+- [Security] bpo-30585: Fix TLS stripping vulnerability in smptlib,
39
+ CVE-2016-0772. Reported by Team Oststrom
40
+
41
- [Security] bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes
42
of multiple security vulnerabilities including: CVE-2017-9233 (External
43
entity infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix),
0 commit comments