Make WordPress Core


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

Add Nonce to updating wporg_favorites user meta field

Merges [37145] to the 4.4 branch

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-admin/includes/ajax-actions.php

    r37144 r37146  
    27532753
    27542754    if ( ! $post = get_post( (int) $_REQUEST['post_id'] ) )
    2755         wp_send_json_error();
     2755        wp_send_json_error(111);
    27562756
    27572757    if ( ! current_user_can( 'read_post', $post->ID ) )
    2758         wp_send_json_error();
     2758        wp_send_json_error(222);
    27592759
    27602760    // Really just pre-loading the cache here.
    27612761    if ( ! $revisions = wp_get_post_revisions( $post->ID, array( 'check_enabled' => false ) ) )
    2762         wp_send_json_error();
     2762        wp_send_json_error(333);
    27632763
    27642764    $return = array();
     
    33113311    }
    33123312
     3313    check_ajax_referer( 'save_wporg_username_' . get_current_user_id() );
     3314
    33133315    $username = isset( $_REQUEST['username'] ) ? wp_unslash( $_REQUEST['username'] ) : false;
    33143316
Note: See TracChangeset for help on using the changeset viewer.