Do only the minimum sanitization on the URL redirect. fixes #2994
git-svn-id: http://svn.automattic.com/wordpress/trunk@4268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
13eb3fbb0d
commit
e416b64e80
|
@ -44,11 +44,15 @@ case 'update':
|
||||||
$f = fopen($real_file, 'w+');
|
$f = fopen($real_file, 'w+');
|
||||||
fwrite($f, $newcontent);
|
fwrite($f, $newcontent);
|
||||||
fclose($f);
|
fclose($f);
|
||||||
wp_redirect("theme-editor.php?file=$file&theme=$theme&a=te");
|
$location = "theme-editor.php?file=$file&theme=$theme&a=te";
|
||||||
} else {
|
} else {
|
||||||
wp_redirect("theme-editor.php?file=$file&theme=$theme");
|
$location = "theme-editor.php?file=$file&theme=$theme";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$location = wp_kses_no_null($location);
|
||||||
|
$strip = array('%0d', '%0a');
|
||||||
|
$location = str_replace($strip, '', $location);
|
||||||
|
header("Location: $location");
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue