Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default charset for the basic http authentication is utf-8. #1325

merged 2 commits into from
Nov 13, 2018


Copy link

@Flyguy Flyguy commented Jun 11, 2018

werkzeug/ Outdated
@@ -505,8 +506,8 @@ def parse_authorization_header(value):
username, password = base64.b64decode(auth_info).split(b':', 1)
except Exception:
return Authorization('basic', {'username': bytes_to_wsgi(username),
'password': bytes_to_wsgi(password)})
return Authorization('basic', {'username': to_unicode(username, _basic_auth_charset),

This comment was marked as off-topic.

Copy link

Rebased, added changelog. Changed this to use to_unicode, as username and password could only contain ASCII anyway, and string operations on unicode that only contains ASCII should still work in Python 2.

@davidism davidism added this to the 0.15 milestone Nov 13, 2018
@davidism davidism merged commit 6e83117 into pallets:master Nov 13, 2018
nicolaiarocci added a commit to pyeve/eve that referenced this pull request Mar 20, 2019
With v0.15 the test suite breaks our auth tests. Culprit appears to be:

Pinning the dependency until I have time to look into it.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants