Changes to how we do redirects.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d4dd7e6fb
commit
c59a8a8119
|
@ -86,6 +86,7 @@ case 'update':
|
||||||
|
|
||||||
$referred = str_replace('?updated=true' , '', $_SERVER['HTTP_REFERER']);
|
$referred = str_replace('?updated=true' , '', $_SERVER['HTTP_REFERER']);
|
||||||
$goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
|
$goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
|
||||||
|
$goback = preg_replace('|[^a-z?=&/~.:_-]|i', '', $goback);
|
||||||
header('Location: ' . $goback);
|
header('Location: ' . $goback);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -458,6 +458,7 @@ case 'delete':
|
||||||
|
|
||||||
$sendback = $_SERVER['HTTP_REFERER'];
|
$sendback = $_SERVER['HTTP_REFERER'];
|
||||||
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
||||||
|
$sendback = preg_replace('|[^a-z?=&/~.:_-]|i', '', $sendback);
|
||||||
header ('Location: ' . $sendback);
|
header ('Location: ' . $sendback);
|
||||||
do_action('delete_post', $post_id);
|
do_action('delete_post', $post_id);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -98,6 +98,8 @@ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
header('Cache-Control: no-cache, must-revalidate');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
$location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
|
$location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
|
||||||
|
$location = preg_replace('|[^a-z?=&/~.:_-]|i', '', $location);
|
||||||
|
|
||||||
if ($is_IIS) {
|
if ($is_IIS) {
|
||||||
header("Refresh: 0;url=$location");
|
header("Refresh: 0;url=$location");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -139,7 +139,7 @@ default:
|
||||||
if( !empty($_POST) ) {
|
if( !empty($_POST) ) {
|
||||||
$log = $_POST['log'];
|
$log = $_POST['log'];
|
||||||
$pwd = $_POST['pwd'];
|
$pwd = $_POST['pwd'];
|
||||||
$redirect_to = preg_replace('|[^a-z/~.:_-]|i', '', $_POST['redirect_to']);
|
$redirect_to = preg_replace('|[^a-z?=&/~.:_-]|i', '', $_POST['redirect_to']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = get_userdatabylogin($log);
|
$user = get_userdatabylogin($log);
|
||||||
|
|
Loading…
Reference in New Issue