-
-
Notifications
You must be signed in to change notification settings - Fork 677
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
Usernames with uppercase chars can no longer log in #2073
Comments
It shouldn't cause federation problems as there are existing matrix user IDs on matrix.org which also have upper-case letters. |
I would like to get into developing for this project and wanted to start with this issue. |
It should be completely not case-sensitive. |
While it was possible to log in with a username with uppercase characters after 1d5fd99, it is again no longer possible. I assume it was this change: |
"Fixed" by adding a line to the build script...
Forcing to lower case is not the same as case insensitivity... |
This is indeed true but if you want to have case insensitivity you'd have to change it all the way down to the database level which might break compatibility with a lot of other parts of the code. As for as I know SQLite supports case-insensitive comparisons for ASCII characters but for PostgreSQL the |
No, how it's supposed to work (at least according to MSC threads) is:
Dendrite succeeds at 1 and fails at 2 and 3. |
I see, how would 2 and 3 be accomplished without just converting the username to lowercase during authentication and registration? |
New accounts are easy: just squash to lowercase or refuse to create the account unless it's all lowercase. This needs to apply to the Authentication requires something like https://pkg.go.dev/strings#EqualFold |
This would let you create account 'admin' when there is already an 'Admin' account. |
Oh true, so I guess it would have to use case folding when checking if the account already exists. |
I'm a user stuck with a username with an uppercase letter. I'd definitely appreciate a migration path to a compliant username (e.g. creation of the lowercase username with deactivation of the non-compliant username). |
This appears to have been fixed at some point, on 0.10.8 I can log in to accounts with capitals provided I exactly match the case of the |
Background information
go version
: 1.17.5Description
If a user has created an account with
create-account
and their username contains a capital letter, they can no longer log in.Steps to reproduce
create-account --username "Test" --password "SomePassword"
We have had such an account for a long time now and were unaware it was not compliant with the spec. Is this going to cause federation problems for the rooms? How can we recover from the situation?
The text was updated successfully, but these errors were encountered: