#24564 closed defect (bug) (duplicate)
wp_insert_post checks permissions of the current user, not the author
| Reported by: | rmccue | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Security | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
In wp_insert_post(), current_user_can() is called twice to check permissions (publish_posts for setting the slug and the assign terms capability for taxonomies.
This global state should be removed from wp_insert_post() in favour of user_can() using the post's author.
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(From a quick look, this also applies to
wp_insert_attachment()as well.)