Make WordPress Core

Ticket #16449: check_admin_referer-notice.diff

File check_admin_referer-notice.diff, 705 bytes (added by duck_, 13 years ago)
  • wp-includes/pluggable.php

     
    866866 * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5)
    867867 */
    868868function check_admin_referer($action = -1, $query_arg = '_wpnonce') {
     869        if ( -1 == $action )
     870                _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
     871
    869872        $adminurl = strtolower(admin_url());
    870873        $referer = strtolower(wp_get_referer());
    871874        $result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;