WordPress.org

Make WordPress Core

Changeset 30421


Ignore:
Timestamp:
11/20/2014 12:24:40 PM (5 years ago)
Author:
nacin
Message:

Form validation for password resets.

Merges [30417] to the 3.7 branch.

Location:
branches/3.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src/wp-login.php

    r29640 r30421  
    570570        list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
    571571        $user = check_password_reset_key( $rp_key, $rp_login );
     572        if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) {
     573            $user = false;
     574        }
    572575    } else {
    573576        $user = false;
     
    628631
    629632    <br class="clear" />
     633    <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
    630634    <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Reset Password'); ?>" /></p>
    631635</form>
Note: See TracChangeset for help on using the changeset viewer.