Make WordPress Core

Ticket #47077: 47077.diff

File 47077.diff, 976 bytes (added by dshanske, 6 years ago)
  • src/wp-includes/rest-api/class-wp-rest-server.php

    diff --git a/src/tags b/src/tags
    new file mode 100644
    index 0000000000..96da1e59b9
    Binary files /dev/null and b/src/tags differ
    diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php
    index 8b09076da0..3eff38d7b3 100644
    a b class WP_REST_Server { 
    13211321                foreach ( $server as $key => $value ) {
    13221322                        if ( strpos( $key, 'HTTP_' ) === 0 ) {
    13231323                                $headers[ substr( $key, 5 ) ] = $value;
     1324                        } elseif ( 'REDIRECT_HTTP_AUTHORIZATION' === $key ) {
     1325                                /*
     1326                                 * In some server configurations, the authorization header is passed in this alternate location.
     1327                                 * Since it would not be passed in in both places we do not check for both headers and resolve.
     1328                                 */
     1329                                $headers[ 'AUTHORIZATION' ] = $value;
    13241330                        } elseif ( isset( $additional[ $key ] ) ) {
    13251331                                $headers[ $key ] = $value;
    13261332                        }