[wp-trac] [WordPress Trac] #17904: Multisite has more restrictions on user login character set

WordPress Trac noreply at wordpress.org
Fri Nov 24 03:46:38 UTC 2023


#17904: Multisite has more restrictions on user login character set
-------------------------------------------------+-------------------------
 Reporter:  duck_                                |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.5
Component:  Login and Registration               |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing-info needs-  |     Focuses:  multisite
  testing needs-unit-tests needs-dev-note        |
-------------------------------------------------+-------------------------
Changes (by rajinsharwar):

 * keywords:  has-patch needs-testing-info needs-testing needs-unit-tests =>
     has-patch needs-testing-info needs-testing needs-unit-tests needs-dev-
     note


Comment:

 So, considering the patch of the PR: 3153, we have got 2 new functions
 introduced:
 1. wp_validate_user_login() | wp-includes/user.php
 2. is_username_reserved() | wp-includes/user.php

 I am afraid we might still need the unit tests for these two new
 functions.

 We have got the {{{ validate_username()}}}function modified, with an
 additional parameter being passed. So, we need to update the developer
 blog as well for that function.

 We got 7 NEW strings introduced, and 3 OLD strings being removed. Added:

 1. Site names can only contain lowercase letters (a-z), numbers, and
 hyphens.

 2. Site names can not begin or end with a hyphen.

 3. Please enter a username.

 4. Username must be at least 4 characters. (NOTE: We can edit this to "The
 Username must be at least of 4 characters".

 5. Sorry, usernames must have letters too!

 6. Sorry, that username is invalid. (NOTE: We can use the "Sorry, that
 username is not allowed" instead of introducing this.

 7. That username is currently reserved, but it may be available in a
 couple of days.

 Removed:

 1. Please enter a username.

 2. This username is already registered. Please choose another one.

 3. Site names can only contain lowercase letters (a-z) and numbers.

 As this change includes major changes for the login and registration
 functions for multi-site, we will need a DEV note for this as well.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/17904#comment:86>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list