[wp-trac] [WordPress Trac] #49669: Duplicate comments from the same user could be inserted to the database

WordPress Trac noreply at wordpress.org
Fri Mar 20 02:30:49 UTC 2020


#49669: Duplicate comments from the same user could be inserted to the database
--------------------------+-----------------------------
 Reporter:  caseqiu       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In file wp_includes/comment.php function wp_new_comment, it first checks
 if the comment content submitted by the user already exists in the
 database (in wp_allow_comment) and then inserts the comment. When race
 condition happens, it could happen that the server handles two requests of
 submitting a comment with the same content from the same user and both
 pass the wp_allow_comment check, resulting in duplicate comments from the
 same user is inserted to the database.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49669>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list