diff --git a/wp-admin/comment.php b/wp-admin/comment.php index 55f4c9e2b..c0c96ec3d 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -184,7 +184,9 @@ case 'approvecomment': case 'editedcomment': - check_admin_referer('update-comment'); + $comment_id = (int) $_POST['comment_ID']; + + check_admin_referer('update-comment_' . $comment_id); edit_comment(); @@ -192,7 +194,7 @@ case 'editedcomment': if (!empty($referredby)) { header('Location: ' . $referredby); } else { - header ("Location: edit.php?p=$comment_post_ID&c=1#comments"); + header ("Location: edit.php?p=$comment_id&c=1#comments"); } break; diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 5b28966cf..1f23cef70 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -6,7 +6,7 @@ $form_extra = "' />\ncomment_ID) ?> +comment_ID) ?>