mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 00:27:38 +02:00
More thorough URI sanitizer in wp_redirect().
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3c161f06ef
commit
cd05f3c004
@ -282,7 +282,7 @@ if ( !function_exists('wp_redirect') ) :
|
|||||||
function wp_redirect($location) {
|
function wp_redirect($location) {
|
||||||
global $is_IIS;
|
global $is_IIS;
|
||||||
|
|
||||||
$location = str_replace( array("\n", "\r"), '', $location);
|
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $location);
|
||||||
|
|
||||||
if ($is_IIS)
|
if ($is_IIS)
|
||||||
header("Refresh: 0;url=$location");
|
header("Refresh: 0;url=$location");
|
||||||
|
Loading…
Reference in New Issue
Block a user