Make WordPress Core


Ignore:
Timestamp:
05/26/2010 04:55:21 AM (15 years ago)
Author:
nacin
Message:

Separate out multiple _ajax_nonce fields on post forms. Yay, validation. fixes #13383.

File:
1 edited

Legend:

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

    r14886 r14933  
    219219    $action = $_POST['action'];
    220220    $taxonomy = get_taxonomy(substr($action, 4));
    221     check_ajax_referer( $action );
     221    check_ajax_referer( $action, '_ajax_nonce-add-' . $taxonomy->name );
    222222    if ( !current_user_can( $taxonomy->cap->edit_terms ) )
    223223        die('-1');
     
    703703    break;
    704704case 'replyto-comment' :
    705     check_ajax_referer( $action );
     705    check_ajax_referer( $action, '_ajax_nonce-replyto-comment' );
    706706
    707707    $comment_post_ID = (int) $_POST['comment_post_ID'];
     
    772772    break;
    773773case 'edit-comment' :
    774     check_ajax_referer( 'replyto-comment' );
     774    check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' );
    775775
    776776    $comment_post_ID = (int) $_POST['comment_post_ID'];
     
    846846    break;
    847847case 'add-meta' :
    848     check_ajax_referer( 'add-meta' );
     848    check_ajax_referer( 'add-meta', '_ajax_nonce-add-meta' );
    849849    $c = 0;
    850850    $pid = (int) $_POST['post_id'];
Note: See TracChangeset for help on using the changeset viewer.