diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-01-17 07:54:47 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-01-17 07:54:47 +0000 |
commit | 0f99b71bd06d5916e1865c7f11f1d4e3fb266034 (patch) | |
tree | 3dac74f0d65f57942c3c6ed63a4a652ef19f1055 /Lib/smtplib.py | |
parent | f43a86b9d784acac33a87e1e0695f2abf28047a2 (diff) | |
download | cpython-git-0f99b71bd06d5916e1865c7f11f1d4e3fb266034.tar.gz |
** 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.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-x | Lib/smtplib.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 9c8c4fa48c..1b9739c81a 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -605,6 +605,14 @@ class SMTP: 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=[], |