Make WordPress Core

Changeset 30420 for branches/3.8


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

Form validation for password resets.

Merges [30417] to the 3.8 branch.

Location:
branches/3.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

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

    r29639 r30420  
    576576        list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
    577577        $user = check_password_reset_key( $rp_key, $rp_login );
     578        if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) {
     579            $user = false;
     580        }
    578581    } else {
    579582        $user = false;
     
    634637
    635638    <br class="clear" />
     639    <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
    636640    <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>
    637641</form>
Note: See TracChangeset for help on using the changeset viewer.