[Python-checkins] python/dist/src/Lib smtplib.py,1.65,1.66

jlgijsbers at users.sourceforge.net jlgijsbers at users.sourceforge.net
Mon Dec 6 22:25:29 CET 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28150

Modified Files:
	smtplib.py 
Log Message:
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.


Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- smtplib.py	10 Jul 2004 23:14:29 -0000	1.65
+++ smtplib.py	6 Dec 2004 21:25:26 -0000	1.66
@@ -530,7 +530,7 @@
             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"



More information about the Python-checkins mailing list