cpython
cpython copied to clipboard
smtplib AUTH command doesn't handle EAI arguments
| BPO | 44269 |
|---|---|
| Nosy | @jrlevine |
| PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2021-05-30.19:25:20.533>
labels = ['3.7', '3.8', 'type-bug', 'library', '3.9']
title = "smtplib AUTH command doesn't handle EAI arguments"
updated_at = <Date 2021-06-13.17:28:41.980>
user = 'https://github.com/jrlevine'
bugs.python.org fields:
activity = <Date 2021-06-13.17:28:41.980>
actor = 'jrlevine'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-05-30.19:25:20.533>
creator = 'jrlevine'
dependencies = []
files = []
hgrepos = []
issue_num = 44269
keywords = ['patch']
message_count = 1.0
messages = ['394779']
nosy_count = 1.0
nosy_names = ['jrlevine']
pr_nums = ['26709']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue44269'
versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9']
In an EAI (SMTPUTF8) mail session, AUTH usernames and passwords can be UTF-8, not just ASCII.
The fix is easy. In smtplib.py, in three places in the auth() and auth_cram_md5() routines change ".encode('ascii')" to ".encode(self.command_encoding)"
I have tried this with EAI mail servers in India and China to be sure it works.