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
This commit is contained in:
John Blackbourn 2017-07-23 01:06:42 +00:00
parent 2efb81d453
commit 1d71fa865c
2 changed files with 2 additions and 2 deletions

View File

@ -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') );

View File

@ -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.