-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
User names containing "-" from LDAP give 422 #11277
Comments
Seems related to #6830 |
Thanks @tigre-bleu According to what @Gargron said, there is a workaround by stripping or changing these problematic characters. But according to the bugs I've linked, hyphens were considered real bugs and those were fixed. |
IMHO, the only solution is to separate authentification to LDAP using email, and username. See the workflow I suggested in #6830: The user auths with LDAP using his email address and if it is the first time, he chooses a pseudo on the platform that shall respect the infamous regex that can't be changed. Next logins he can either use is email to auth against LDAP, or use his pseudo. Mastodon then auths with LDAP by looking up for the email in its database. If we don't want to bother too much, we could just allow to log via email and there is not the lookup functionnality to add. |
see #12021 Looks like you just need to set the So this can be closed. |
Thanks for the information. |
Expected behaviour
User names containing hyphens ("-") are possible in connected systems using LDAP or other authentication. Mastodon should let all users (including those with hyphens in account name) authenticated by LDAP in.
Actual behaviour
If a user has "-" in the username and enters the password correctly, HTTP 422 error is returned. In case of incorrect password, the user is refused correctly.
Steps to reproduce the problem
Try to login with any user coming from LDAP auth and having hyphen in the username. We could try it with a brand new user, so nobody could ever login with a username like this before.
Specifications
v2.9.2
Probably related to:
Issue: #9066
Issue: #9309
PR: #9345
The text was updated successfully, but these errors were encountered: