Skip to content

Preserve legacy Unicode usernames during login - #266

Draft
coder13 wants to merge 2 commits into
masterfrom
agent/fix-legacy-unicode-username
Draft

Preserve legacy Unicode usernames during login#266
coder13 wants to merge 2 commits into
masterfrom
agent/fix-legacy-unicode-username

Conversation

@coder13

@coder13 coder13 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Preserve legacy non-ASCII usernames during unrelated PostgreSQL user updates.

Root cause

PostgreSQL login updates the existing user record. The repository re-ran the new ASCII-only username validator on every write, so accounts with legacy Greek usernames could not complete OAuth login.

Changes

  • Preserve the original username display value, such as Αλέξανδρος.
  • Store NULL only in the separate username_normalized lookup field when the legacy value is not valid for new username lookup.
  • Keep validation unchanged for new username changes.
  • Add regression coverage for the username helper and PostgreSQL repository path.

Validation

  • ESLint passed for the changed server files.
  • Jest passed: 2 suites, 20 tests.
  • git diff --check passed.

PostgreSQL users with legacy non-ASCII usernames must remain readable while the account owner chooses a valid new username. Keep the stored display value and clear the normalized lookup key during unrelated updates, with regression coverage for the login persistence path.
Make the persistence distinction explicit: preserve the username display value and use NULL only for the missing normalized lookup key. Strengthen the regression test to assert both database parameters.
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