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

Why does upstream OAuth registration limit username to 14 characters? #2454

Open
eforest opened this issue Mar 7, 2024 · 3 comments
Open
Labels
A-Policy Related the policy engine A-Registration-Flow Related to the user registration flow T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@eforest
Copy link

eforest commented Mar 7, 2024

Why does upstream OAuth registration limit username to 14 characters?
Is there any reason regarding integration with matrix-home-server?

see https://github.com/matrix-org/matrix-authentication-service/blob/main/policies/register.rego [21-23]

Best Regards

@sandhose sandhose added T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. A-Registration-Flow Related to the user registration flow A-Policy Related the policy engine labels Mar 18, 2024
@sandhose
Copy link
Member

I think this is a leftover from when I implemented the policy engine. There are no good reason for this arbitrary limit

@sandhose
Copy link
Member

#2471 bumped the limit to 64 characters. It's still a somewhat arbitrary limit, but probably better than before. I need to investigate what would be the impact of a very very long MXID

@thegcat
Copy link

thegcat commented Apr 10, 2024

Quick heads-up here as we ran into the other side of the problem (a user with a 2-character username getting bumped by MAS, issue incoming): the spec only limits the total length of the MXID to 255 characters, so the upper bound for a username would be 255 - length of the server name - 2.

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 A-Registration-Flow Related to the user registration flow T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

3 participants