Skip to content

Commit 8e20725

Browse files
committed
Add a note about the username pattern change and existing usernames
1 parent 797d9a4 commit 8e20725

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: h/models/user.py

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222

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

2733
EMAIL_MAX_LENGTH = 100

0 commit comments

Comments
 (0)