Skip to content

fix(ui): allow uppercase letters in username on profile settings - #1572

Open
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/username-uppercase-profile
Open

fix(ui): allow uppercase letters in username on profile settings#1572
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/username-uppercase-profile

Conversation

@culfin

@culfin culfin commented Aug 18, 2026

Copy link
Copy Markdown

Users whose username contains an uppercase letter cannot save their profile at all — not even when they leave the username untouched, because the whole form is validated on submit.

The check in profile settings is the only one of four that rejects uppercase:

where pattern uppercase
ui/src/pages/Users/Register/components/SignUpForm/index.tsx /^[\w.-\s]{2,30}$/ allowed
ui/src/pages/Install/components/FourthStep/index.tsx /^[\w.-\s]{2,30}$/ allowed
pkg/checker/username.go ^[\w.\- ]{2,30}$ allowed
ui/src/pages/Users/Settings/Profile/index.tsx /[^a-z0-9\-._]/ rejected

So one can sign up as MaxMustermann, and from then on the profile page is locked. The error message points at the username field without saying why a name the server itself issued is suddenly invalid.

I ran into this migrating a 26-year-old forum to Answer: 3368 of 5479 accounts carry uppercase letters in names that have been in use for two decades.

Proposed Changes

  • add the ignore-case flag to the username check in profile settings, bringing it in line with registration, installation and the server
  • permits nothing the server would reject; no data or API behaviour changes

An alternative would be to reuse the exact pattern from SignUpForm, but that also allows spaces, which felt like a larger change than this fix needs. Happy to switch if you prefer the patterns to be literally identical.

The username check in profile settings is the only one that rejects
uppercase letters. Registration, installation and the server all accept
them:

  ui/src/pages/Users/Register/components/SignUpForm/index.tsx
    /^[\w.-\s]{2,30}$/          uppercase allowed
  ui/src/pages/Install/components/FourthStep/index.tsx
    /^[\w.-\s]{2,30}$/          uppercase allowed
  pkg/checker/username.go
    ^[\w.\- ]{2,30}$            uppercase allowed
  ui/src/pages/Users/Settings/Profile/index.tsx
    /[^a-z0-9\-._]/             uppercase rejected

A user who signs up as "MaxMustermann" can therefore never save their
profile, not even when leaving the username untouched, because the whole
form is validated on submit. The error message points at the username
field without explaining why a name the server issued is now invalid.

Adding the ignore-case flag brings this check in line with the other
three. It permits nothing the server would reject.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@LinkinStars
LinkinStars requested a review from robinv8 August 18, 2026 09:20
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

Successfully merging this pull request may close these issues.

1 participant