From 1d71fa865c7d13c748a31cde6287b7bce4cbd0af Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 23 Jul 2017 01:06:42 +0000 Subject: [PATCH] Login and Registration: Correctly encode the redirect location URL when it's passed as a query parameter to the lost password URL. Props adhun Fixes #40728 Built from https://develop.svn.wordpress.org/trunk@41121 git-svn-id: http://core.svn.wordpress.org/trunk@40961 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 026d190108..087f47ad2a 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -492,7 +492,7 @@ function wp_login_form( $args = array() ) { function wp_lostpassword_url( $redirect = '' ) { $args = array( 'action' => 'lostpassword' ); if ( !empty($redirect) ) { - $args['redirect_to'] = $redirect; + $args['redirect_to'] = urlencode( $redirect ); } $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 8669137f58..e1410eb3ac 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41120'; +$wp_version = '4.9-alpha-41121'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.