Make WordPress Core


Ignore:
Timestamp:
08/14/2012 06:39:15 PM (13 years ago)
Author:
ryan
Message:

Remove post type from post nonces. Fixes attachment deletion when EMPTY_TRASH_DAYS is 0. Props c3mdigital, kurtpayne, SergeyBiryukov. fixes #21194

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ajax-actions.php

    r21413 r21504  
    17281728        $post_type = $_POST['post_type'];
    17291729
    1730     check_ajax_referer('update-' . $post_type . '_' . $post_id, '_wpnonce');
     1730    check_ajax_referer('update-post_' . $post_id, '_wpnonce');
    17311731
    17321732    $post_id = edit_post();
     
    17701770        wp_die( 0 );
    17711771
    1772     check_ajax_referer( 'update-' . $post->post_type . '_' . $post_id );
     1772    check_ajax_referer( 'update-post_' . $post_id );
    17731773
    17741774    if ( ! current_user_can( 'edit_post', $post_id ) )
Note: See TracChangeset for help on using the changeset viewer.