Form validation for password resets.
Merges [30417] to the 3.7 branch. Built from https://develop.svn.wordpress.org/branches/3.7@30421 git-svn-id: http://core.svn.wordpress.org/branches/3.7@30416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7e1c039ed1
commit
61d9bd544b
|
@ -569,6 +569,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;
|
||||||
}
|
}
|
||||||
|
@ -627,6 +630,7 @@ case 'rp' :
|
||||||
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p>
|
<p class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).'); ?></p>
|
||||||
|
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
<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