Open
Bug 2089200
Opened 5 days ago
Updated 5 days ago
Enforce unique nicknames with a UNIQUE index on profiles.nickname
Categories
(bugzilla.mozilla.org :: General, enhancement)
Tracking
()
ASSIGNED
People
(Reporter: dkl, Assigned: dkl)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
- Nickname uniqueness is enforced only in Perl (_generate_nickname, Bugzilla/User.pm:483). The schema has a plain index, and accounts without a nickname store '' as the default.
- Production had zero duplicate nicknames on 2026-11-04, so an index can be added without cleaning up data first.
- Plan:
a. Make nickname nullable and convert '' to NULL in Install/DB.pm.
b. Have _generate_nickname return undef instead of ''.
c. Add a UNIQUE index (MySQL allows many NULLs).
d. Catch the duplicate-key error from simultaneous nickname claims and fall back to no nickname. - Check _migrate_nicknames (NOT nickname never matches NULL) and any callers comparing nicknames with ''.
- Follow-up: once the index exists, _users_for_mentions and mention-autocomplete.js no longer need their duplicate handling.
- Should block the mentions tracking bug 2085134.
Comment 1•5 days ago
|
||
(via GitHub webhook, authenticated as shared-secret)
You need to log in
before you can comment on or make changes to this bug.
Description
•