From 15b4fa81d2f7b0a64a6534c1b1723aa507e661bb Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Wed, 15 Jun 2016 14:51:27 +0000 Subject: [PATCH] Comments: Do not flag a comment as a duplicate if the `comment_author_email` is provided but not a match. This reduces the strictness of the duplicate check a little, but does prevent false duplicates for emoji or +1 comments by authors with matching names. The current logic was introduced all the way back in [2894]. Fixes #37093. Built from https://develop.svn.wordpress.org/trunk@37713 git-svn-id: http://core.svn.wordpress.org/trunk@37679 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index fb8c3193ae..dc5f1c15c4 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -600,7 +600,7 @@ function wp_allow_comment( $commentdata ) { ); if ( $commentdata['comment_author_email'] ) { $dupe .= $wpdb->prepare( - "OR comment_author_email = %s ", + "AND comment_author_email = %s ", wp_unslash( $commentdata['comment_author_email'] ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index f56a32d5f9..d1153845d9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37712'; +$wp_version = '4.6-alpha-37713'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.