Make WordPress Core

Changeset 24466 for trunk/wp-login.php


Ignore:
Timestamp:
06/21/2013 03:00:26 AM (12 years ago)
Author:
nacin
Message:

Validate post password hash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r24317 r24466  
    408408
    409409case 'postpass' :
    410     if ( empty( $wp_hasher ) ) {
    411         require_once( ABSPATH . 'wp-includes/class-phpass.php' );
    412         // By default, use the portable hash from phpass
    413         $wp_hasher = new PasswordHash(8, true);
    414     }
     410    require_once ABSPATH . 'wp-includes/class-phpass.php';
     411    $hasher = new PasswordHash( 8, true );
    415412
    416413    // 10 days
    417     setcookie( 'wp-postpass_' . COOKIEHASH, $wp_hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
     414    setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), time() + 10 * DAY_IN_SECONDS, COOKIEPATH );
    418415
    419416    wp_safe_redirect( wp_get_referer() );
Note: See TracChangeset for help on using the changeset viewer.