Login and Registration: Simplify the test for wp_signon() added in [46640].

Make sure it actually tests the change in behavior, previously it passed both before and after the patch.

Add `wp_unslash()` to the last remaining instance of `$_POST['user_login']` that didn't have it.

See #38744.
Built from https://develop.svn.wordpress.org/trunk@46650


git-svn-id: http://core.svn.wordpress.org/trunk@46450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-11-04 15:06:02 +00:00
parent b5bf852dfe
commit 4ef6154be2
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-46649'; $wp_version = '5.4-alpha-46650';
/** /**
* 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.

View File

@ -373,7 +373,7 @@ function retrieve_password() {
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no account with that username or email address.' ) ); $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no account with that username or email address.' ) );
} }
} else { } else {
$login = trim( $_POST['user_login'] ); $login = trim( wp_unslash( $_POST['user_login'] ) );
$user_data = get_user_by( 'login', $login ); $user_data = get_user_by( 'login', $login );
} }