WordPress.org

Make WordPress Core

Ticket #17018: 17018-make-them-work.patch

File 17018-make-them-work.patch, 612 bytes (added by hakre, 7 years ago)

for those who want to adapt an existing installation working with passwords that have already been emailed to a larger user-base, this example code / patch might seem handy.

  • wp-includes/pluggable.php

     
    15021502
    15031503        $check = $wp_hasher->CheckPassword($password, $hash);
    15041504
     1505        // if $password is at least double slashed and check failed, try again with one level of slashes removed.
     1506        if (!$check && false !== strpos($password, "\\\\")) {
     1507                $check = $wp_hasher->CheckPassword(stripslashes($password), $hash);
     1508        }
     1509
    15051510        return apply_filters('check_password', $check, $password, $hash, $user_id);
    15061511}
    15071512endif;