mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Security: Return a 403 instead of a 200 HTTP status when check_ajax_referer() fails.
This is, unfortunately, untestable in the current test suite, even in the AJAX tests. Fixes #36362 git-svn-id: https://develop.svn.wordpress.org/trunk@38421 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1108,7 +1108,7 @@ function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) {
|
||||
|
||||
if ( $die && false === $result ) {
|
||||
if ( wp_doing_ajax() ) {
|
||||
wp_die( -1 );
|
||||
wp_die( -1, 403 );
|
||||
} else {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user