Form validation for password resets.
Built from https://develop.svn.wordpress.org/trunk@30417 git-svn-id: http://core.svn.wordpress.org/trunk@30412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ddb3ee5057
commit
b271e36f47
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-beta1-30412';
|
$wp_version = '4.1-beta1-30417';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -576,6 +576,9 @@ case 'rp' :
|
||||||
if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
|
if ( isset( $_COOKIE[ $rp_cookie ] ) && 0 < strpos( $_COOKIE[ $rp_cookie ], ':' ) ) {
|
||||||
list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
|
list( $rp_login, $rp_key ) = explode( ':', wp_unslash( $_COOKIE[ $rp_cookie ] ), 2 );
|
||||||
$user = check_password_reset_key( $rp_key, $rp_login );
|
$user = check_password_reset_key( $rp_key, $rp_login );
|
||||||
|
if ( isset( $_POST['pass1'] ) && ! hash_equals( $rp_key, $_POST['rp_key'] ) ) {
|
||||||
|
$user = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$user = false;
|
$user = false;
|
||||||
}
|
}
|
||||||
|
@ -644,6 +647,7 @@ case 'rp' :
|
||||||
*/
|
*/
|
||||||
do_action( 'resetpass_form', $user );
|
do_action( 'resetpass_form', $user );
|
||||||
?>
|
?>
|
||||||
|
<input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
|
||||||
<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>
|
<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>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue