From 1daab2358be63ea96e5089e8c4243cd838796044 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 10 Apr 2012 17:21:17 +0000 Subject: [PATCH] Use wp_safe_redirect(). No need to allow offsite redirects. git-svn-id: https://develop.svn.wordpress.org/trunk@20425 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-comments-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-comments-post.php b/wp-comments-post.php index c059012cc2..194e00f544 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -95,5 +95,5 @@ do_action('set_comment_cookies', $comment, $user); $location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id; $location = apply_filters('comment_post_redirect', $location, $comment); -wp_redirect($location); +wp_safe_redirect( $location ); exit;