-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
Email address with leading/trailing whitespace treated as different identifier #2158
Comments
Nice find, we should probably add some type of sanitation (I think there's another similar issue tracked here already). A simple |
There is #814, which dealt with capitalization (but that was already fixed). Personally, I think that whitespace should be ignored for regular usernames, too, i.e. the sanitation behavior for whitespace and capitalization should be the same. |
I can confirm that especially apple mobile devices add whitespace after word completion, which is not obvious to users. Experienced that once myself, took me quite some time to figure it out. That issue will also be true for usernames. |
I just noticed a mistaken assumption in my initial comment:
While I think it is correct to fail in the described scenario (where |
Preflight checklist
Describe the bug
Suppose an account exists for
"[email protected]"
, then it is not possible to log in using"[email protected] "
(same string but with trailing whitespace, which often happens on mobile phones with auto-completion) or" [email protected]"
(leading whitespace). In both cases, the error message reads"The provided credentials are invalid, check for spelling mistakes in your password or username, email address, or phone number."
. I think whitespace around the identifier should be ignored.Even worse, entirely new accounts can be registered for all of the following:
etc.
Interestingly, trying to register an account for
"[email protected] "
(trailing space instead of leading) will fail, as it should. The error message there reads"\"[email protected] \" is not valid \"email\""
.Reproducing the bug
Create an account for
"[email protected]"
and verify that logging into it works, then log out again.At this point the following things will fail, although they should succeed:
"[email protected] "
" [email protected]"
The following will work, although it should fail:
" [email protected]"
The following will correctly fail:
"[email protected] "
(Note that the quotation marks are not part of user input. I had to add them to deal with Markdown formatting issues.)
Relevant log output
No response
Relevant configuration
Version
v0.8.0-alpha.3
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
No response
The text was updated successfully, but these errors were encountered: