Change basic authentication to use UTF-8
See original GitHub issueAt the moment, BasicCredentials
use ISO 8859-1 charset, which would break authentication if, say, a password contains a character not present in that charset.
RFC 7617 outlines support for UTF-8 in basic authentication scheme. The short of it is, that in an older RFC the charset was left unspecified by mistake, so handling of non-ASCII characters was non-standard. Now the server can choose to declare its support for UTF-8 via the charset
auth-param, and the client can choose to use it. See appendix B for ways to provide some backward compatibility.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
What encoding should I use for HTTP Basic Authentication?
The reason for this choice I believe is that UTF-8 is capable of encoding all possible characters, while ISO-8859-1 (or ASCII) is not....
Read more >A Basic authentication module that uses UTF-8 to encode ...
A Basic authentication module that uses UTF-8 to encode username and password (rather than ANSI for the built-in ... Change it to use...
Read more >Change Basic authentication request header username and ...
Change Basic authentication request header username and password character encoding to UTF-8 (used to be ISO-8859-1)
Read more >An Encoding Parameter for HTTP Basic Authentication draft ...
In the first authentication request, choose the character encoding based on the user's credentials: if they do not need any characters outside the...
Read more >Unicode username & password - Google Groups
convert the username/password strings to UTF-8 before calling ... sounds like it's not safe to use unicode for basic or digest authentication credentials....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can pick this up. @rossabaker If it’s okay, can you assign this to me?
Yes, it makes sense to me to parameterize that.