[wp-trac] [WordPress Trac] #38417: Post status enum is ignored in collection params, allowing invalid values
WordPress Trac
noreply at wordpress.org
Thu Oct 20 18:49:15 UTC 2016
#38417: Post status enum is ignored in collection params, allowing invalid values
--------------------------+------------------
Reporter: joehoyle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------
Comment (by wkwalrath):
Want to add a bit more background to this. Discussion started in this bit
of Slack channel history: https://wordpress.slack.com/archives/core-
restapi/p1476975790009158.
I reported getting weird results from authenticated API requests using
query param `status=publish,draft`.
@joehoyle determined:
> I was able to reproduce I think
> `status=publish,draft` sanitizes to `status=publishdraft`, which is an
invalid status, so WP_Query doesn’t add a WHERE for post_status
And sounds like separate ticket may be opened to discuss queries with
multiple status values.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38417#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list