Page MenuHomePhabricator

Allow username changes which modify letter case to go through as valid
ClosedPublic

Authored by epriestley on Wed, Nov 6, 4:08 PM.

Details

Summary

Fixes T13446. Currently, the validation logic here rejects a rename like "alice" to "ALICE" (which changes only letter case) but this is a permissible rename.

Allow collisions that collide with the same user to permit this rename.

Also, fix an issue where an empty rename was treated improperly.

Test Plan
  • Renamed "alice" to "ALICE".
    • Before: username collision error.
    • After: clean rename.
  • Renamed "alice" to "orange" (an existing user). Got an error.
  • Renamed "alice" to "", "!@#$", etc (invalid usernames). Got sensible errors.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Wed, Nov 6, 4:08 PM
This revision was not accepted when it landed; it landed in state Needs Review.Wed, Nov 6, 4:10 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.