[wp-trac] [WordPress Trac] #16129: Incorrect cap check in wp-admin/includes/comment.php : edit_comment()

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 7 02:52:38 UTC 2011


#16129: Incorrect cap check in wp-admin/includes/comment.php : edit_comment()
----------------------------+------------------
 Reporter:  westi           |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  3.1
Component:  Administration  |     Version:  3.1
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by garyc40):

 I haven't tested the patch yet, but at a glance, it should be:

 {{{
 if ( !current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) )
 }}}

 Otherwise you're passing the ID of the post containing the comment.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16129#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list