[wp-trac] [WordPress Trac] #38816: REST API: logic error in comments post ID
WordPress Trac
noreply at wordpress.org
Thu Nov 17 22:13:46 UTC 2016
#38816: REST API: logic error in comments post ID
----------------------------------------+-----------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: rest-api
----------------------------------------+-----------------------
Comment (by rachelbaker):
> I'm not sure I understand the logic behind allowing comment creation for
a non-existent post_id if the user has moderate_comments cap though
@jnylen0 @dd32 We support this with the REST API because
`wp_insert_comment()` supports adding comments without an attached post_ID
- and our endpoints are intended to mirror the underlying WordPress API
functions. I am open to changing the cap check here, if you have other
ideas.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38816#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list