Changeset 11251 for sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-bad-request.php
- Timestamp:
- 09/23/2021 02:26:52 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-bad-request.php
r11250 r11251 37 37 * @see https://core.trac.wordpress.org/ticket/17737 38 38 */ 39 add_action( ' send_headers', function( $wp ) {39 add_action( 'parse_request', function( $wp ) { 40 40 check_for_invalid_query_vars( $wp->query_vars, '$public_query_vars' ); 41 } );41 }, 0 ); 42 42 43 43 /** … … 135 135 ! is_user_logged_in() && 136 136 empty( $_SERVER['HTTP_AUTHORIZATION'] ) && 137 in_array( $items, [ 8, 16, 32, 64, 128, 255, 256, 512, 1024 ], true ) &&138 137 wp_using_ext_object_cache() 139 138 ) { … … 152 151 153 152 // Only increment it for high counts, but block on low counts if exceeded. 154 if ( $items > 16|| $hits > 20 ) {153 if ( $items > 32 || $hits > 20 ) { 155 154 $hits = wp_cache_incr( $key, 1, $group ); 156 155 } … … 229 228 include WPORGPATH . '/403.php'; 230 229 } else { 231 \wp_die( 'Bad Request ', 'Bad Request', [ 'response' => 400 ] );230 \wp_die( 'Bad Request: Your request contained query variables that are unexpected. Please contact #meta.', 'Bad Request', [ 'response' => 400 ] ); 232 231 } 233 232 exit;
Note: See TracChangeset
for help on using the changeset viewer.