WordPress.org

Make WordPress Core

Ticket #29079: http-args-dropped.patch

File http-args-dropped.patch, 1.2 KB (added by Corphi, 7 years ago)

Separate query args, don’t hand HTTP args to the filter.

  • src/wp-admin/includes/theme.php

     
    337337                if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
    338338                        $url = set_url_scheme( $url, 'https' );
    339339
    340                 $args = array(
     340                $http_args = array(
    341341                        'body' => array(
    342342                                'action' => $action,
    343343                                'request' => serialize( $args )
    344344                        )
    345345                );
    346                 $request = wp_remote_post( $url, $args );
     346                $request = wp_remote_post( $url, $http_args );
    347347
    348348                if ( $ssl && is_wp_error( $request ) ) {
    349349                        if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
    350350                                trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
    351351                        }
    352                         $request = wp_remote_post( $http_url, $args );
     352                        $request = wp_remote_post( $http_url, $http_args );
    353353                }
    354354
    355355                if ( is_wp_error($request) ) {