[wp-trac] [WordPress Trac] #33793: Adding a user with a username 52 characters or longer fails, but displays success message.

WordPress Trac noreply at wordpress.org
Mon Sep 14 19:25:34 UTC 2015


#33793: Adding a user with a username 52 characters or longer fails, but displays
success message.
------------------------------------------+-----------------------------
 Reporter:  tommarshall                   |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Users                         |     Version:  3.8.8
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:  administration
------------------------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => needs-patch needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 Replying to [comment:6 tommarshall]:
 > It feels like it would be better to return to the truncation behaviour
 present in 3.8.7 if possible, rather than introducing additional
 validation.

 The truncation that took place prior to 3.8.8 (and corresponding releases
 on the 3.9, 4.0, 4.1, and 4.2 branches) was an unintended consequence of
 shoving too much data into a field. We can't revert directly to that
 behavior. Moreover, silently truncating user-provided data is never a good
 idea - it means that a user could attempt to register with one username,
 but be provided with a different one, without any appropriate feedback.

 `user_login` and `user_nicename` field lengths have been the same forever
 [2213]. It's likely that increasing them would introduce complications. If
 there's a pressing reason to change one or both, let's handle it as a
 separate enhancement ticket. We should solve the current problem with
 better validation.

 It looks like `wp_insert_user()` fails silently when 'user_login' is
 greater than 60 chars, and when 'user_nicename' is greater than 50 chars.
 We'll need separate validation for each, plus unit tests.

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


More information about the wp-trac mailing list