JPKCom Disable XML-RPC

Documentation

Table of Contents

Packages

JPKComDisableXmlrpc
JPKComDisableXmlrpcGitUpdate

Namespaces

JPKComDisableXmlrpcGitUpdate

Constants

JPKCOM_DISABLE_XMLRPC_VERSION  : mixed = '1.0.9'

Functions

jpkcom_disable_xmlrpc_is_xmlrpc_request()  : bool
Whether the current request is being served by xmlrpc.php.
jpkcom_disable_xmlrpc_fault_xml()  : string
Build the XML-RPC fault sent in place of a served request.

Constants

Functions

jpkcom_disable_xmlrpc_is_xmlrpc_request()

Whether the current request is being served by xmlrpc.php.

jpkcom_disable_xmlrpc_is_xmlrpc_request() : bool

XMLRPC_REQUEST is defined at the top of xmlrpc.php, before wp-load.php runs, so it is set for every request that reaches the endpoint. Up to 1.0.8 this was derived from basename( $_SERVER['SCRIPT_FILENAME'] ) instead, which depends on how a given SAPI populates that variable, and the value was pushed through sanitize_text_field() first - a function that strips tags and %xx sequences and therefore alters a filesystem path rather than securing it.

Tags
since
1.0.9
Return values
bool

True when serving an XML-RPC request.

jpkcom_disable_xmlrpc_fault_xml()

Build the XML-RPC fault sent in place of a served request.

jpkcom_disable_xmlrpc_fault_xml() : string

A fault response keeps the refusal machine-readable for XML-RPC clients, which cannot parse the HTML error page wp_die() would normally produce.

Tags
since
1.0.9
Return values
string

A complete XML-RPC methodResponse fault document.

Search results