mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Canonical: Ensure redirect query keys are URL encoded.
This prevents an infinite redirect loop when a request containing URL-encoded characters triggers `is_404()`. Props soulseekah, wrwrwr0. Fixes #43745. Built from https://develop.svn.wordpress.org/trunk@45133 git-svn-id: http://core.svn.wordpress.org/trunk@44942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
965941ab3a
commit
625d1694a3
@ -388,7 +388,10 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_parsed_query = rawurlencode_deep( $_parsed_query );
|
$_parsed_query = array_combine(
|
||||||
|
rawurlencode_deep( array_keys( $_parsed_query ) ),
|
||||||
|
rawurlencode_deep( array_values( $_parsed_query ) )
|
||||||
|
);
|
||||||
$redirect_url = add_query_arg( $_parsed_query, $redirect_url );
|
$redirect_url = add_query_arg( $_parsed_query, $redirect_url );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.2-beta1-45132';
|
$wp_version = '5.2-beta1-45133';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user