summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorJohannes Gijsbers <jlg@dds.nl>2004-12-06 21:25:26 (GMT)
committerJohannes Gijsbers <jlg@dds.nl>2004-12-06 21:25:26 (GMT)
commit25946ddac90e2f69199af740cbaaa08beb13d9a9 (patch)
tree3013584eeea877c9eb534c70d2f692bc3cf82161 /Lib/smtplib.py
parentb8b09d05130aeba86ae41d3bee8fa3c6e7395339 (diff)
downloadcpython-25946ddac90e2f69199af740cbaaa08beb13d9a9.zip
cpython-25946ddac90e2f69199af740cbaaa08beb13d9a9.tar.gz
cpython-25946ddac90e2f69199af740cbaaa08beb13d9a9.tar.bz2
Patch #1075928: AUTH PLAIN in smtplib.
smtplib can not log in to some server using command AUTH PLAIN, it sends ``user\0user\0pass'' to the server, but ``\0user\0pass'' has better compatibility.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 2e12483..368aa8d 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -530,7 +530,7 @@ class SMTP:
return encode_base64(response, eol="")
def encode_plain(user, password):
- return encode_base64("%s\0%s\0%s" % (user, user, password), eol="")
+ return encode_base64("\0%s\0%s" % (user, password), eol="")
AUTH_PLAIN = "PLAIN"