Skip to content

Commit

Permalink
Use wp_safe_redirect(). No need to allow offsite redirects.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@20425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Apr 10, 2012
1 parent b0a9755 commit ab78931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-comments-post.php
Expand Up @@ -95,5 +95,5 @@
$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;

0 comments on commit ab78931

Please sign in to comment.