WordPress.org

Make WordPress Core

Ticket #10808: check-ajax-referer.patch

File check-ajax-referer.patch, 481 bytes (added by prettyboymp, 6 years ago)
  • pluggable.php

     
    821821        if ( $query_arg ) 
    822822                $nonce = $_REQUEST[$query_arg]; 
    823823        else 
    824                 $nonce = $_REQUEST['_ajax_nonce'] ? $_REQUEST['_ajax_nonce'] : $_REQUEST['_wpnonce']; 
     824                $nonce = empty($_REQUEST['_ajax_nonce']) ? $_REQUEST['_wpnonce'] : $_REQUEST['_ajax_nonce']; 
    825825 
    826826        $result = wp_verify_nonce( $nonce, $action ); 
    827827