HomePhabricator

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

Description

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

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.

Maniphest Tasks: T13446

Differential Revision: https://secure.phabricator.com/D20890