Make WordPress Core

Ticket #49956: 49956-1.patch

File 49956-1.patch, 669 bytes (added by ayeshrajans, 5 years ago)
  • wp-includes/comment.php

    diff --git a/wp-includes/comment.php b/wp-includes/comment.php
    index 8eb1c97da5..fa3937c7cb 100644
    a b function wp_get_unapproved_comment_author_email() { 
    18441844                $comment_id = (int) $_GET['unapproved'];
    18451845                $comment    = get_comment( $comment_id );
    18461846
    1847                 if ( $comment && hash_equals( $_GET['moderation-hash'], wp_hash( $comment->comment_date_gmt ) ) ) {
     1847                if ( $comment
     1848                                 && $_SERVER['REMOTE_ADDR'] === $comment->comment_author_IP
     1849                                 && hash_equals( $_GET['moderation-hash'], wp_hash( $comment->comment_date_gmt ) )
     1850                ) {
    18481851                        $commenter_email = $comment->comment_author_email;
    18491852                }
    18501853        }