Skip to content

Conversation

@sandhose
Copy link
Member

@sandhose sandhose commented Dec 19, 2024

This adds the server_name to the policy data, which lets us compute the MXID, which means we can accurately make sure we allow MXIDs up to 255 characters long.
It also makes the minimal username length 1 instead of 3.

I also made it so that we get 'error codes' from the policy violations, which lets us translate more specific error messages

Fixes #2454
Fixes #2620

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 19, 2024

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1dfda93
Status: ✅  Deploy successful!
Preview URL: https://ae6fc9f2.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-mxid-length-policy.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose requested a review from reivilibre December 19, 2024 22:02
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these policies overridable by the admin? It doesn't seem sensible to let an admin override the maximum length (or alphabet check, particularly if it might allow unicode user IDs).
I would say to be careful that count counts bytes and not 'characters', but if we restrict to the restricted set of ASCII then that's fine.

@sandhose
Copy link
Member Author

sandhose commented Jan 6, 2025

are these policies overridable by the admin? It doesn't seem sensible to let an admin override the maximum length (or alphabet check, particularly if it might allow unicode user IDs).

It's anyway calling Synapse's 'username available' endpoint, which checks that as well. This is mainly making the error better for the end user

@sandhose sandhose merged commit e03aa6c into main Jan 6, 2025
19 checks passed
@sandhose sandhose deleted the quenting/mxid-length-policy branch January 6, 2025 09:15
@sandhose sandhose added T-Enhancement New feature of request A-Spec-Compliance Divergence from the Matrix or the OAuth 2.0/OIDC specifications labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Spec-Compliance Divergence from the Matrix or the OAuth 2.0/OIDC specifications T-Enhancement New feature of request

Projects

None yet

2 participants