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

Skip to content

Commit 25946dd

Browse files
author
Johannes Gijsbers
committed
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.
1 parent b8b09d0 commit 25946dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/smtplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def encode_cram_md5(challenge, user, password):
530530
return encode_base64(response, eol="")
531531

532532
def encode_plain(user, password):
533-
return encode_base64("%s\0%s\0%s" % (user, user, password), eol="")
533+
return encode_base64("\0%s\0%s" % (user, password), eol="")
534534

535535

536536
AUTH_PLAIN = "PLAIN"

0 commit comments

Comments
 (0)