Make WordPress Core


Ignore:
Timestamp:
03/30/2016 06:35:37 PM (9 years ago)
Author:
jorbin
Message:

Add Nonce to updating wporg_favorites user meta field

File:
1 edited

Legend:

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

    r37143 r37145  
    27602760
    27612761    if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) )
    2762         wp_send_json_error();
     2762        wp_send_json_error(111);
    27632763
    27642764    if ( ! current_user_can( 'read_post', $post->ID ) )
    2765         wp_send_json_error();
     2765        wp_send_json_error(222);
    27662766
    27672767    // Really just pre-loading the cache here.
    27682768    if ( ! $revisions = wp_get_post_revisions( $post->ID, array( 'check_enabled' => false ) ) )
    2769         wp_send_json_error();
     2769        wp_send_json_error(333);
    27702770
    27712771    $return = array();
     
    33183318    }
    33193319
     3320    check_ajax_referer( 'save_wporg_username_' . get_current_user_id() );
     3321
    33203322    $username = isset( $_REQUEST['username'] ) ? wp_unslash( $_REQUEST['username'] ) : false;
    33213323
Note: See TracChangeset for help on using the changeset viewer.