Make WordPress Core

Changeset 34909


Ignore:
Timestamp:
10/07/2015 02:29:29 PM (10 years ago)
Author:
johnbillion
Message:

Prevent a PHP notice from appearing on wp-login.php?action=postpass when there's no $_POST['post_password'] parameter. Redirects to the referer if there is one (if there isn't one it'll just exit with a blank screen; no need for a user-friendly error message here).

Fixes #34160
Props iamfriendly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r34885 r34909  
    473473
    474474case 'postpass' :
     475    if ( ! array_key_exists( 'post_password', $_POST ) ) {
     476        wp_safe_redirect( wp_get_referer() );
     477        exit();
     478    }
     479
    475480    require_once ABSPATH . WPINC . '/class-phpass.php';
    476481    $hasher = new PasswordHash( 8, true );
Note: See TracChangeset for help on using the changeset viewer.