Make WordPress Core

Ticket #24973: trim-passwords.diff

File trim-passwords.diff, 811 bytes (added by rpattillo, 11 years ago)

SVN diff file, adding trim() to wp_hash_password() and removing it from wp_set_password()

  • pluggable.php

    Property changes on: .
    ___________________________________________________________________
    Added: svn:ignore
       + .pluggable.php.swp
    
    
     
    14191419                $wp_hasher = new PasswordHash(8, true);
    14201420        }
    14211421
    1422         return $wp_hasher->HashPassword($password);
     1422        return $wp_hasher->HashPassword(trim($password));
    14231423}
    14241424endif;
    14251425
     
    15661566function wp_set_password( $password, $user_id ) {
    15671567        global $wpdb;
    15681568
    1569         $hash = wp_hash_password( trim( $password ) );
     1569        $hash = wp_hash_password( $password );
    15701570        $wpdb->update($wpdb->users, array('user_pass' => $hash, 'user_activation_key' => ''), array('ID' => $user_id) );
    15711571
    15721572        wp_cache_delete($user_id, 'users');