WordPress.org

Make WordPress Core

Ticket #42183: 42183.1.patch

File 42183.1.patch, 720 bytes (added by rinkuyadav999, 3 years ago)
  • src/wp-includes/user.php

     
    18201820        // Escape data pulled from DB.
    18211821        $user = add_magic_quotes( $user );
    18221822
    1823         if ( ! empty( $userdata['user_pass'] ) && $userdata['user_pass'] !== $user_obj->user_pass ) {
    1824                 // If password is changing, hash it now
     1823        if ( ! empty( $userdata['user_pass'] ) && false === wp_check_password( $userdata['user_pass'], $user_obj->user_pass, $ID ) ) {
     1824                // If password is changing, hash it now.
    18251825                $plaintext_pass = $userdata['user_pass'];
    18261826                $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
    18271827