Administration: Send an appropriate HTTP response status code when an invalid action is passed to `admin-ajax.php`.
Props ryanrolds, ayeshrajans Fixes #41269 Built from https://develop.svn.wordpress.org/trunk@41120 git-svn-id: http://core.svn.wordpress.org/trunk@40960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4a0f65a8a
commit
2efb81d453
|
@ -26,7 +26,7 @@ send_origin_headers();
|
||||||
|
|
||||||
// Require an action parameter
|
// Require an action parameter
|
||||||
if ( empty( $_REQUEST['action'] ) )
|
if ( empty( $_REQUEST['action'] ) )
|
||||||
die( '0' );
|
wp_die( '0', 400 );
|
||||||
|
|
||||||
/** Load WordPress Administration APIs */
|
/** Load WordPress Administration APIs */
|
||||||
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
|
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
|
||||||
|
@ -101,4 +101,4 @@ if ( is_user_logged_in() ) {
|
||||||
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
|
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] );
|
||||||
}
|
}
|
||||||
// Default status
|
// Default status
|
||||||
die( '0' );
|
wp_die( '0', 400 );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9-alpha-41119';
|
$wp_version = '4.9-alpha-41120';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue