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

User registration blocked when {{ user.preferred_username }} contains invalid MXID LocalPart characters #3593

Open
kieranlane opened this issue Nov 28, 2024 · 0 comments

Comments

@kieranlane
Copy link

Describe the bug
When a user logs into MAS with their Identity Provider for the first time, they are presented with a screen to create their MXID. The Localpart is pre-populated with {{ user.preferred_username }} from the IDP.

However, users can be blocked from registering when the {{ user.preferred_username }} contains an invalid character for MXID LocalParts i.e. @. Related to #3592, if an invalid suggestion is provided by the IDP and the user is free to change the invalid value (i.e. No LocalPart template to enforce), instead of being blocked from registration, the user should be presented with the screen to create their MXID and a warning noting that the suggested LocalPart is invalid.

To Reproduce
Steps to reproduce the behavior:

  1. Setup Keycloak with a user whose {{ user.preferred_username }} is an email (i.e. [email protected])
  2. Configure MAS with Keycloak, do not configure a LocalPart template
  3. Go to deployed Element Web, get taken to MAS, Sign in as adrian.costello via Keycloak.
  4. You will be presented with an error preventing account creation despite no enforcement of the localpart, so in theory you should be able to select something different.

Expected behavior
When a user is presented with an error due to the IDP providing a value that is invalid, if that value isn't enforced (like via a LocalPart template), then the user should still be presented with the screen to create their MXID, but with an error indicating which fields should be changed due to an invalid value.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant