[wp-trac] [WordPress Trac] #35269: Check data type of wp_xmlrpc_server_class filter before instantiate wp_xmlrpc_server_class
WordPress Trac
noreply at wordpress.org
Wed Dec 30 21:32:25 UTC 2015
#35269: Check data type of wp_xmlrpc_server_class filter before instantiate
wp_xmlrpc_server_class
-----------------------------+-----------------------------
Reporter: onetarek | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 4.4
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
There is a filter 'wp_xmlrpc_server_class' in ./xmlrpc.php for a plugin to
entirely replace the standard XML-RPC server implementation.
For some case we want to entirely disable XML-RPC server. So we pass a
FALSE value through the wp_xmlrpc_server_class filter. And it causes a
Fatal error in xmlrpc.php
To prevent this error we pass a fake class name that contains a blank
method serve_request.
But it would better if there is a validity check of the return value of
wp_xmlrpc_server_class filter.
If the return value is not a valid class_name then $wp_xmlrpc_server_class
will not be instantiated and process will be exit there.
I have a patch for this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35269>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list