Make WordPress Core

Ticket #39645: 39645.2.diff

File 39645.2.diff, 861 bytes (added by Presskopp, 4 years ago)

refreshed patch

  • wp-includes/user.php

     
    30893089        // Check the username.
    30903090        if ( '' === $sanitized_user_login ) {
    30913091                $errors->add( 'empty_username', __( '<strong>Error</strong>: Please enter a username.' ) );
     3092        }
     3093        // Don't let somebody fake an admin account
     3094          elseif ( lcfirst( $sanitized_user_login ) == 'admin' ) {     
     3095                $errors->add( 'invalid_username', __( '<strong>Error</strong>: You are not allowed to use this username for security reasons.' ) );
    30923096        } elseif ( ! validate_username( $user_login ) ) {
    30933097                $errors->add( 'invalid_username', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
    30943098                $sanitized_user_login = '';