[wp-trac] [WordPress Trac] #21194: Delete attachment AJAX fails when EMPTY_TRASH_DAYS is set to 0 days

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 9 17:57:53 UTC 2012


#21194: Delete attachment AJAX fails when EMPTY_TRASH_DAYS is set to 0 days
---------------------------+------------------------------
 Reporter:  simonwheatley  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:  2.0
 Severity:  normal         |  Resolution:
 Keywords:  dev-feedback   |
---------------------------+------------------------------

Comment (by nacin):

 It looks like we do trash-{$post_type}_$id in a number of places. This is
 more work for us, considering we use the $id to glean the post type anyway
 and already couple these with delete_post cap checks (so no added security
 benefit), and just causes breakage like this.

 I wouldn't mind converting all trash/untrash/delete-{$post_type} nonces
 (including 'attachment') to be converted to a simple 'post'. Seems like
 that would fix our problems.

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


More information about the wp-trac mailing list