Comment nonce fixes from Mark Jaquith and mdawaffe. fixes #2760

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-06-01 16:58:44 +00:00
parent df86f53ebc
commit c80bebbcd6
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ $form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment-
?>
<form name="post" action="post.php" method="post" id="post">
<?php wp_nonce_field('update-comment' . $comment->comment_ID) ?>
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
<div class="wrap">
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />

View File

@ -322,7 +322,8 @@ case 'approvecomment':
case 'editedcomment':
check_admin_referer('update-comment');
$comment_id = (int) $_POST['comment_ID'];
check_admin_referer('update-comment_' . $comment_id);
edit_comment();