Skip to content

Erroneous error when selecting a username #4170

@hibes

Description

@hibes

Describe the bug
This username is already taken is displayed when an uppercase username value is rejected by matrix/synapse.

To Reproduce
Steps to reproduce the behavior:

  1. Set up an external IdP with registration enabled
  2. Register a new account using the IdP
  3. When returning to matrix authentication service to select a username, try a new unique username containing an uppercase letter
  4. Observe the erroneous error message This username is already taken
  5. Remove the uppercase letter
  6. Observe the expected behavior of registering the new username with matrix

Expected behavior
The error message should reflect the error from synapse (something like User ID can only contain characters a-z, 0-9, or '=_-./+' -- see below)

synapse-1  | 2025-03-08 20:19:57,259 - synapse.http.server - 130 - INFO - GET-2294 - <XForwardedForRequest at 0x7f0b3d7a83b0 method='GET' uri='/_synapse/admin/v1/username_available?username=Onecapitalletterisenough' clientproto='HTTP/1.1' site='8008'> SynapseError: 400 - User ID can only contain characters a-z, 0-9, or '=_-./+'

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

Image

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox
  • Version: 136

Smartphone (please complete the following information):
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Upstream-OAuthRelated to login via upstream OAuth 2.0 providersO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-TolerableMinor significance, cosmetic issues, low or no impact to users.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions