Changes between Initial Version and Version 2 of Ticket #37093
- Timestamp:
- 06/14/2016 01:43:45 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #37093 – Description
initial v2 1 1 under includes/comment.php, there is this piece of code in version 4.5.2: 2 2 {{{ 3 3 dupe = $wpdb->prepare( 4 4 "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = %s AND comment_approved != 'trash' AND ( comment_author = %s ", … … 17 17 wp_unslash( $commentdata['comment_content'] ) 18 18 ); 19 }}} 19 20 20 21 The OR condition: ( comment_author = %s OR comment_author_email = %s) will not work if a comment is posted by an author who happens to have the same "comment_author" value as someone else who has already posted the comment and they both post exactly the same comment for some reason. See this example: 22 21 The OR condition: {{{( comment_author = %s OR comment_author_email = %s)}}} will not work if a comment is posted by an author who happens to have the same "comment_author" value as someone else who has already posted the comment and they both post exactly the same comment for some reason. See this example: 22 {{{ 23 23 Comment 1 24 24 --------------- … … 36 36 comment_author = "Daniel" 37 37 comment_author_email = "different_daniel@yahoo.com' 38 38 }}} 39 39 In this case, comment 2 will be rejected as dupe according to the query but this is not a dupe. 40 40