From 4ef6154be24afa86288aa8b5800d8e2f7a782a95 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 4 Nov 2019 15:06:02 +0000 Subject: [PATCH] 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 --- wp-includes/version.php | 2 +- wp-login.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 05793da085..1a4410ccb6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @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. diff --git a/wp-login.php b/wp-login.php index ff70d59492..1e1ba5cc6a 100644 --- a/wp-login.php +++ b/wp-login.php @@ -373,7 +373,7 @@ function retrieve_password() { $errors->add( 'invalid_email', __( 'ERROR: There is no account with that username or email address.' ) ); } } else { - $login = trim( $_POST['user_login'] ); + $login = trim( wp_unslash( $_POST['user_login'] ) ); $user_data = get_user_by( 'login', $login ); }