Make WordPress Core


Ignore:
Timestamp:
07/23/2017 12:20:37 AM (7 years ago)
Author:
johnbillion
Message:

Administration: Send an appropriate HTTP response status code when an invalid action is passed to admin-ajax.php.

Props ryanrolds, ayeshrajans

Fixes #41269

File:
1 edited

Legend:

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

    r40607 r41120  
    2727// Require an action parameter
    2828if ( empty( $_REQUEST['action'] ) )
    29     die( '0' );
     29    wp_die( '0', 400 );
    3030
    3131/** Load WordPress Administration APIs */
     
    102102}
    103103// Default status
    104 die( '0' );
     104wp_die( '0', 400 );
Note: See TracChangeset for help on using the changeset viewer.