Skip to content

Commit

Permalink
Add a note about the username pattern change and existing usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Feb 11, 2025
1 parent 14b707d commit 6a8559e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions h/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@

# nb. This pattern is used in Python code, JSON schemas and HTML forms, so it
# needs to use portable syntax.
#
# This pattern was changed in Feb 2025 to restrict the characters that can occur
# at the start and end of usernames. There are a small number of existing user
# accounts which do not conform to the latest pattern. Hence APIs and forms
# which accept existing usernames need to support a more liberal pattern
# (`[A-Za-z0-9._]+`).
USERNAME_PATTERN = "^[A-Za-z0-9_][A-Za-z0-9._]+[A-Za-z0-9_]$"

EMAIL_MAX_LENGTH = 100
Expand Down

0 comments on commit 6a8559e

Please sign in to comment.