Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#11548 closed defect (bug) (fixed)

Possible to create a user with an empty user_login using wp_insert_user

Reported by: westi Owned by: westi
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.8
Component: Users Keywords:
Focuses: Cc:


The code in wp_insert_user does not check to see if the sanitised name which will be used for user_login is actually a useful username.

It is therefore possible to end up with a user with an empty user_login which is not much use.

This is hilighted by #10319 which talk about issues with the import and non-ascii usernames.

The purpose of this ticket is to fix wp_insert_user to stop the users getting created.

Change History (1)

comment:1 @westi6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12468]) Add stricter checks to wp_insert_user() to ensure we don't create a user with an empty user_login but return a WP_Error instead. Fixes #11548.

Note: See TracTickets for help on using tickets.