Make WordPress Core


Ignore:
Timestamp:
08/28/2016 05:14:52 PM (8 years ago)
Author:
johnbillion
Message:

Security: Trigger a _doing_it_wrong() when check_ajax_referer() is called without its first parameter. This brings it inline with check_admin_referer().

Fixes #36361

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r38411 r38420  
    10811081 */
    10821082function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
     1083    if ( -1 == $action ) {
     1084        _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '4.7' );
     1085    }
     1086
    10831087    $nonce = '';
    10841088
Note: See TracChangeset for help on using the changeset viewer.