Making WordPress.org

Changeset 11637


Ignore:
Timestamp:
03/04/2022 02:16:23 AM (3 years ago)
Author:
dd32
Message:

Bad Requests: Remove admin-ajax.php action checking, now handled by core.

See https://core.trac.wordpress.org/changeset/52813/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-bad-request.php

    r11596 r11637  
    179179
    180180/**
    181  * Detect invalid admin ajax requests.
    182  */
    183 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
    184     add_action( 'admin_init', function() {
    185         if ( ! empty( $_REQUEST['action'] ) && ! is_scalar( $_REQUEST['action'] ) ) {
    186             die_bad_request( "non-scalar action in admin-ajax." );
    187         }
    188     } );
    189 }
    190 
    191 /**
    192181 * Die with a 400 Bad Request.
    193182 *
Note: See TracChangeset for help on using the changeset viewer.