Opened 11 months ago
Closed 11 months ago
#20991 closed defect (bug) (fixed)
wp.getPosts doesn't always check cap
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4.1 |
| Component: | XML-RPC | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
The cap check against 'edit_posts' in the XML-RPC wp.getPosts method does not fire immediately when querying against the 'post' post type. For other post types ('page', 'attachment', or CPTs), the cap check will fire early and short-circuit the method execution with an error.
The cap is checked properly before outputting each post, so at worst a non-capable user will get an empty array as output. However, by that point the query will have run.
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.

Unit test in [UT738].