Make WordPress Core

Changeset 25197 for trunk/src


Ignore:
Timestamp:
08/31/2013 04:35:15 AM (11 years ago)
Author:
nacin
Message:

Case insensitivity for is_email_address_unsafe().

props jkudish.
fixes #25046.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r25183 r25197  
    380380
    381381    if ( $banned_names && is_array( $banned_names ) ) {
    382         list( $email_local_part, $email_domain ) = explode( '@', $user_email );
     382        $banned_names = array_map( 'strtolower', $banned_names );
     383        $normalized_email = strtolower( $user_email );
     384
     385        list( $email_local_part, $email_domain ) = explode( '@', $normalized_email );
    383386
    384387        foreach ( $banned_names as $banned_domain ) {
     
    392395
    393396            $dotted_domain = ".$banned_domain";
    394             if ( $dotted_domain === substr( $user_email, -strlen( $dotted_domain ) ) ) {
     397            if ( $dotted_domain === substr( $normalized_email, -strlen( $dotted_domain ) ) ) {
    395398                $is_email_address_unsafe = true;
    396399                break;
Note: See TracChangeset for help on using the changeset viewer.