Make WordPress Core


Ignore:
Timestamp:
11/29/2019 10:02:30 PM (6 years ago)
Author:
SergeyBiryukov
Message:

REST API: Use strict in_array() checks for the list of usernames blacklisted via illegal_user_logins filter.

See #48839.

File:
1 edited

Legend:

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

    r46697 r46804  
    489489    $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
    490490
    491     if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ) ) ) {
     491    if ( in_array( strtolower( $user_name ), array_map( 'strtolower', $illegal_logins ), true ) ) {
    492492        $errors->add( 'user_name', __( 'Sorry, that username is not allowed.' ) );
    493493    }
Note: See TracChangeset for help on using the changeset viewer.