Making WordPress.org


Ignore:
Timestamp:
05/26/2020 12:25:00 AM (6 years ago)
Author:
dd32
Message:

Bad Requests: Don't load block assets (amongst others) on the 403 page, remove a contact form check that's no longer needed.

File:
1 edited

Legend:

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

    r9925 r9926  
    7575                        die_bad_request( "Missing referer or user-agent" );
    7676                }
    77                 // Jetpack Contact forms can have array fields, but we have none on WordPress.org
    7877                foreach ( $_REQUEST as $k => $v ) {
    79                         if ( ! is_scalar( $v ) ) {
    80                                 die_bad_request( "non-scalar input to Jetpack Contact Form" );
    81                         }
    8278                        if ( 'sample@email.tst' === $v ) {
    8379                                die_bad_request( "sample@email.tst input to Jetpack Contact Form" );
    … …  
    129125                ! defined( 'XMLRPC_REQUEST' ) && ! defined( 'REST_REQUEST' )
    130126        ) {
     127                // Bare header, we don't need Block assets.
     128                remove_all_actions( 'wp_head' );
     129
    131130                status_header( 400 );
    132131                $header_set_for_403 = true;
Note: See TracChangeset for help on using the changeset viewer.