[wp-trac] [WordPress Trac] #49903: Can't post comment with content "0" (string with zero)
WordPress Trac
noreply at wordpress.org
Sat Apr 25 23:03:16 UTC 2020
#49903: Can't post comment with content "0" (string with zero)
--------------------------+-----------------------------
Reporter: Cawa-93 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: REST API | Version: 5.4
Severity: major | Resolution:
Keywords: needs-patch | Focuses: rest-api
--------------------------+-----------------------------
Changes (by TimothyBlynJacobs):
* milestone: Awaiting Review => Future Release
Comment:
Thanks for the ticket @Cawa-93!
It looks like `wp_handle_comment_submission` strictly rejects an empty
string which would allow a comment of `0`.
Originally, the REST API comments controller did the same check, but in
#38720 this was loosened to an `empty` check. Looking at the ticket, I'm
not entirely sure why that part of the change was necessary.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49903#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list