Make WordPress Core

Ticket #63154: moderation.patch

File moderation.patch, 590 bytes (added by leedxw, 2 months ago)

patch to test if moderation-hash is not an array

  • wp-includes/comment.php

    diff --git a/wp-includes/comment.php b/wp-includes/comment.php
    index 2cc74ad5..9c922b3d 100644
    a b function wp_get_current_commenter() { 
    19521952function wp_get_unapproved_comment_author_email() {
    19531953        $commenter_email = '';
    19541954
    1955         if ( ! empty( $_GET['unapproved'] ) && ! empty( $_GET['moderation-hash'] ) ) {
     1955        if ( ! empty( $_GET['unapproved'] ) && ! empty( $_GET['moderation-hash'] ) && ! is_array( $_GET['moderation-hash'] ) ) {
    19561956                $comment_id = (int) $_GET['unapproved'];
    19571957                $comment    = get_comment( $comment_id );
    19581958