Make WordPress Core


Ignore:
Timestamp:
05/09/2017 04:54:52 PM (9 years ago)
Author:
jeremyfelt
Message:

Multisite: Check only valid looking emails against banned domain list.

If an email address is missing an @, we can't assume enough to check it against a list of domain names.

Additional validation of email should happen in is_email() before being passed to is_email_address_unsafe().

Fixes #39915.

File:
1 edited

Legend:

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

    r40594 r40595  
    355355        $is_email_address_unsafe = false;
    356356
    357         if ( $banned_names && is_array( $banned_names ) ) {
     357        if ( $banned_names && is_array( $banned_names ) && false !== strpos( $user_email, '@', 1 ) ) {
    358358                $banned_names = array_map( 'strtolower', $banned_names );
    359359                $normalized_email = strtolower( $user_email );
Note: See TracChangeset for help on using the changeset viewer.