[Python-checkins] r60017 - in python/branches/release25-maint: Lib/smtplib.py Misc/NEWS
gregory.p.smith
python-checkins at python.org
Thu Jan 17 08:54:47 CET 2008
Author: gregory.p.smith
Date: Thu Jan 17 08:54:47 2008
New Revision: 60017
Modified:
python/branches/release25-maint/Lib/smtplib.py
python/branches/release25-maint/Misc/NEWS
Log:
** backport r60015 from trunk.
- Issue829951: In the smtplib module, SMTP.starttls() now complies with
RFC 3207 and forgets any knowledge obtained from the server not obtained
from the TLS negotiation itself. Patch contributed by Bill Fenner.
Modified: python/branches/release25-maint/Lib/smtplib.py
==============================================================================
--- python/branches/release25-maint/Lib/smtplib.py (original)
+++ python/branches/release25-maint/Lib/smtplib.py Thu Jan 17 08:54:47 2008
@@ -605,6 +605,14 @@
sslobj = socket.ssl(self.sock, keyfile, certfile)
self.sock = SSLFakeSocket(self.sock, sslobj)
self.file = SSLFakeFile(sslobj)
+ # RFC 3207:
+ # The client MUST discard any knowledge obtained from
+ # the server, such as the list of SMTP service extensions,
+ # which was not obtained from the TLS negotiation itself.
+ self.helo_resp = None
+ self.ehlo_resp = None
+ self.esmtp_features = {}
+ self.does_esmtp = 0
return (resp, reply)
def sendmail(self, from_addr, to_addrs, msg, mail_options=[],
Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS (original)
+++ python/branches/release25-maint/Misc/NEWS Thu Jan 17 08:54:47 2008
@@ -165,6 +165,10 @@
- Issue1385: The hmac module now computes the correct hmac when using hashes
with a block size other than 64 bytes (such as sha384 and sha512).
+- Issue829951: In the smtplib module, SMTP.starttls() now complies with
+ RFC 3207 and forgets any knowledge obtained from the server not obtained
+ from the TLS negotiation itself. Patch contributed by Bill Fenner.
+
Extension Modules
-----------------
More information about the Python-checkins
mailing list