Fix unfiltered_html_comment nonce, props nacin, fixes #18319
git-svn-id: https://develop.svn.wordpress.org/trunk@18852 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8c9d5285ac
commit
1aad45debc
@ -648,8 +648,8 @@ case 'replyto-comment' :
|
||||
$comment_author_email = $wpdb->escape($user->user_email);
|
||||
$comment_author_url = $wpdb->escape($user->user_url);
|
||||
$comment_content = trim($_POST['content']);
|
||||
if ( current_user_can('unfiltered_html') ) {
|
||||
if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
|
||||
if ( current_user_can( 'unfiltered_html' ) ) {
|
||||
if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) {
|
||||
kses_remove_filters(); // start with a clean slate
|
||||
kses_init_filters(); // set up the filters
|
||||
}
|
||||
|
@ -356,8 +356,11 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
|
||||
<input type="hidden" name="position" id="position" value="<?php echo $position; ?>" />
|
||||
<input type="hidden" name="checkbox" id="checkbox" value="<?php echo $checkbox ? 1 : 0; ?>" />
|
||||
<input type="hidden" name="mode" id="mode" value="<?php echo esc_attr($mode); ?>" />
|
||||
<?php wp_nonce_field( 'replyto-comment', '_ajax_nonce-replyto-comment', false ); ?>
|
||||
<?php wp_comment_form_unfiltered_html_nonce(); ?>
|
||||
<?php
|
||||
wp_nonce_field( 'replyto-comment', '_ajax_nonce-replyto-comment', false );
|
||||
if ( current_user_can( 'unfiltered_html' ) )
|
||||
wp_nonce_field( 'unfiltered-html-comment', '_wp_unfiltered_html_comment', false );
|
||||
?>
|
||||
<?php if ( $table_row ) : ?>
|
||||
</td></tr></tbody></table>
|
||||
<?php else : ?>
|
||||
|
Loading…
Reference in New Issue
Block a user