mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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.
This commit is contained in:
parent
b8b09d0513
commit
25946ddac9
1 changed files with 1 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue