Attempt to decode Name/Password from Basic Auth as UTF-8 #1684
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
and cope with the fact that curl (tested on 7.19.7 and 7.56.1) and google-chrome 63.0.3239.108 will send 'UTF-8' encoded strings within the base64 encoded basic auth string.
Attempting to send charset in the 'www-authenticate'-header was ignored by Firefox 57.0.2 (32-Bit), curl 7.56.1, Google-Chrome 63.0.3239.108, Internet Explorer 11.786.15063.0 and Edge 40.15063.674.0. So RFC-7617 is beeing ignored as of 2018-01-01 from those browers.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix
What is the related issue number (starting with
#
)CherryPy will allways decode basic authentication information with ISO-8859-1 #1680
What is the current behavior? (You can also link to an open issue here)
Name/Password will allways be decoded with ISO-8859-1
What is the new behavior (if this is a feature change)?
This will try to decode name and password as UTF-8 if possible.
Other information: