Make WordPress Core


Ignore:
Timestamp:
12/21/2020 08:21:12 PM (4 years ago)
Author:
johnbillion
Message:

XML-RPC: Emit an appropriate HTTP status code when an error is returned in response to an XML-RPC request.

This most notably affects the response when XML-RPC is disabled or when the supplied username and password is incorrect.

Props ericmann

Fixes #48213

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/IXR/class-IXR-server.php

    r47926 r49862  
    130130            $error = new IXR_Error($error, $message);
    131131        }
     132
     133        if ( function_exists( 'status_header' ) ) {
     134            status_header( $error->code );
     135        }
     136
    132137        $this->output($error->getXml());
    133138    }
Note: See TracChangeset for help on using the changeset viewer.