Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ab6e156

Browse files
committed
merge 3.5
2 parents 6bf8e61 + b0557e7 commit ab6e156

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/smtplib.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,11 @@ def starttls(self, keyfile=None, certfile=None, context=None):
773773
self.ehlo_resp = None
774774
self.esmtp_features = {}
775775
self.does_esmtp = 0
776+
else:
777+
# RFC 3207:
778+
# 501 Syntax error (no parameters allowed)
779+
# 454 TLS not available due to temporary reason
780+
raise SMTPResponseException(resp, reply)
776781
return (resp, reply)
777782

778783
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Library
4141
- Issue #20508: Improve exception message of IPv{4,6}Network.__getitem__.
4242
Patch by Gareth Rees.
4343

44+
- Fix TLS stripping vulnerability in smptlib, CVE-2016-0772. Reported by Team
45+
Oststrom
46+
4447
- Issue #21386: Implement missing IPv4Address.is_global property. It was
4548
documented since 07a5610bae9d. Initial patch by Roger Luethi.
4649

0 commit comments

Comments
 (0)