Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#49669 new defect (bug)

Duplicate comments from the same user could be inserted to the database

Reported by: caseqiu Owned by:
Priority: normal Milestone: Awaiting Review
Component: Comments Version: 5.4
Severity: minor Keywords:
Cc: Focuses:

Description

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.

Change History (1)

#1 @SergeyBiryukov
7 years ago

  • Component General → Comments
Note: See TracTickets for help on using tickets.