BUG: Changing WordPress.com username mishandles uppercase
-
Repro steps:
* Navigate to account page, type in new legal, available username (e.g., “ThisIsACoolLongNewName”)
* See “Nice username!” message under the text box
* Confirm the name by typing it again
* See “Thanks for confirming your username!”
* Click “Change Username” button
* See dialog warning about effects of changing username
* Click [OK]
!= Black toast message floats up from bottom of page: “Failed to update username.”
* Retry using all lowercase characters in HTML form (e.g., “thisisacoollongnewname”)
* Success
EXPECT ONE OF:
– Uppercase characters are rejected in HTML form
– Uppercase characters are automatically updated ToLowercase() in HTML form
– Uppercase characters are silently updated ToLowercase() before calling backend API -
That’s not a bug, those are the rules of our platform.
Username Rules
- Must use lowercase letters (a-z) only.
- Can contain numbers (0-9).
- Cannot include uppercase letters.
- Cannot have spaces.
Alternatives
- Set a Display Name on your profile if you want capitalized words shown publicly.
-
Right, the bug isn’t in the username rules. It’s that the validation in the HTML form doesn’t follow those rules when it comes to capital letters – it appears to validate correctly, then fails with generic error msg when submitting.
In the input form:
* this<space>name => “Usernames can only contain lowercase letters (a-z) and numbers.”
* this&that => “Usernames can only contain lowercase letters (a-z) and numbers.”
* “ThisIsACoolLongNewName” => “Nice username!”EXPECT ONE OF:
– Uppercase characters are rejected in HTML form (“Usernames can only contain lowercase letters (a-z) and numbers.”)
– Uppercase characters are automatically updated ToLowercase() in HTML form
– Uppercase characters are silently updated ToLowercase() before calling backend API