Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 9 years ago

#11753 closed defect (bug) (fixed)

3.0 upgrader needs to lowercase usernames

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: 3.0 Priority: normal
Severity: major Version: 3.0
Component: General Keywords:
Focuses: multisite Cc:

Description

I'm opening this in advance so we don't forget. ms-default-filters.php has the following filter:

add_action ( 'sanitize_user', 'strtolower_usernames', 10, 3 );

after upgrading to 3.0, some users may end up wanting to turn their existing sites in a Multisite install. In the event this happens, we should:

  • fix the strtolower_usernames() function if needed (see #11751)
  • lowercase all usernames accordingly
  • double check that previous logins still work (they should work fine, see #5472)

Change History (14)

#1 @nacin
15 years ago

  • Keywords multisite added

#2 @hakre
15 years ago

regarding naming of a user see: #10319

#3 @nacin
15 years ago

Just to update, this is now add_action ( 'sanitize_user', 'strtolower' ); as of [12948].

#4 @wpmuguru
15 years ago

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

Usernames with uppercase letters and spaces can log in fine. I couldn't find any issues with either spaces or uppercase letters in the username.

#5 follow-up: @aaroncampbell
14 years ago

Can we remove that filter then instead of adding a fix for WP->WPMS? Is there some place where MS is actually relying on a username being lowercase?

#6 in reply to: ↑ 5 ; follow-up: @Justin_K
12 years ago

I'm wondering this too; is there any reason this filter is even needed? Upon enabling MS on a site with an existing (large) user table, suddenly switching case breaks the continuity of my user naming convention.

#7 in reply to: ↑ 6 ; follow-up: @nacin
12 years ago

Replying to Justin_K:

I'm wondering this too; is there any reason this filter is even needed? Upon enabling MS on a site with an existing (large) user table, suddenly switching case breaks the continuity of my user naming convention.

We removed the lowercase requirements before 3.0 got released.

#8 in reply to: ↑ 7 ; follow-up: @Justin_K
12 years ago

...But if the requirement isn't there, why is that filter applied to all multisite installs? (ms-default-filters.php, line 21 as of WP 3.5.1)

#9 in reply to: ↑ 8 ; follow-up: @nacin
12 years ago

Replying to Justin_K:

...But if the requirement isn't there, why is that filter applied to all multisite installs? (ms-default-filters.php, line 21 as of WP 3.5.1)

You're right. You can open a new ticket if you think this should be removed, though I am guessing any changes will require quite a bit of research into the history and original reasoning of this.

#10 in reply to: ↑ 9 @Justin_K
12 years ago

OK, thanks. And then in the interim at least, you're saying that you're essentially certain it's safe for me to just remove that filter?

#11 follow-up: @wpmuguru
12 years ago

@Justin_K - You should test the conclusion you are drawing in a dev/test install before disabling the filter on your live install.

#12 in reply to: ↑ 11 @Justin_K
12 years ago

Of course - but as a non-core-developer, there's always a very big chance that I wouldn't think of some corner-case reason for which something was implemented - which is why I was asking, "what's the purpose of this?" If the answer is simply "it's leftover from an old version and is no longer needed," then I'd trust my quick test that it's OK, but if the answer is "there were some complicated considerations that might not be readily apparent," then my testing on a dev site is unlikely to reveal whether or not it's safe to remove :P

#13 @duck_
12 years ago

#17904 is an existing ticket about the extra multisite restrictions.

This ticket was mentioned in Slack in #core-multisite by ocean90. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.