Skip to content
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

Upstream OAuth registration requires usernames of length 3 or more, Matrix Spec allows 1 or more #2620

Open
thegcat opened this issue Apr 10, 2024 · 1 comment
Labels
A-Policy Related the policy engine

Comments

@thegcat
Copy link

thegcat commented Apr 10, 2024

We unfortunately have a user with a 2-character username that is currently unable to register with our Matrix server. This seems to be cause by the registration policy https://github.com/matrix-org/matrix-authentication-service/blob/main/policies/register.rego#L17-L19 requiring usernames to be of a length between 3 and 64. The MXID spec however allows the local part of the ID (i.e. the username) to be as short as 1 character, and only requires that the length of the whole MXID not be over 255 characters.

A stop-gap solution for us would be to remove the lower bound and just check that a username is present at all. The better solution would probably be to rework this part of the policy to adhere to the Matrix spec.

Thank you for your help.

@sandhose sandhose added the A-Policy Related the policy engine label Apr 11, 2024
@thegcat
Copy link
Author

thegcat commented May 23, 2024

Mmh, it seems I fudged the link to the spec…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Policy Related the policy engine
Projects
None yet
Development

No branches or pull requests

2 participants