[wp-trac] [WordPress Trac] #40950: wp_terms_checklist() does not pass $post_id to current_user_can()

WordPress Trac noreply at wordpress.org
Thu Jun 29 10:03:50 UTC 2017


#40950: wp_terms_checklist() does not pass $post_id to current_user_can()
----------------------------+------------------------------
 Reporter:  anigel          |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+------------------------------

Comment (by swissspidy):

 Hey there,

 Thanks for your ticket & patch!

 This doesn't seem to be the only place where `current_user_can(
 $tax->cap->assign_terms )` is used.

 Usually, there are "meta" capabilities (e.g. edit_post + post ID) and
 "primitive" capabilities (e.g. edit_posts) in core for such checks.

 Looking at [38698], we should probably use `assign_term` here instead of
 `$tax->cap->assign_terms`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40950#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list