From 91f18f3d4549d4ed82517e83f84eae45e0a2eb1b Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 20 May 2016 19:20:44 +0000 Subject: [PATCH] During password reset, user-submitted login/email should be stripslashed. This prevents errors when an email address contains an apostrophe. See [29966] for similar treatment of a related problem. Props dcavins. Fixes #36322. git-svn-id: https://develop.svn.wordpress.org/trunk@37474 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-login.php b/src/wp-login.php index 96eef5b27d..1c2428217f 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -294,7 +294,7 @@ function retrieve_password() { if ( empty( $_POST['user_login'] ) ) { $errors->add('empty_username', __('ERROR: Enter a username or email address.')); } elseif ( strpos( $_POST['user_login'], '@' ) ) { - $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) ); + $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) ); if ( empty( $user_data ) ) $errors->add('invalid_email', __('ERROR: There is no user registered with that email address.')); } else {