[wp-trac] [WordPress Trac] #14933: IXR_Server->call() fails when calling method that uses __call()
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 23 08:48:56 UTC 2010
#14933: IXR_Server->call() fails when calling method that uses __call()
--------------------------------------------+-------------------------------
Reporter: dave1010 | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 3.0.1
Severity: normal | Resolution:
Keywords: IXR extending xmlrpc has-patch |
--------------------------------------------+-------------------------------
Comment(by dave1010):
Thanks for the patch against trunk. I'm still learning SVN.
`__call()` is called when a method of that name is not visible. I.e. if
you have private / protected methods with the same name. This means
certain non-public methods can be run, but they are filtered through
`__call()`. In my code I'm also modifying $method in some cases.
Some random examples of what is possible using `__call()` in this
situation:
{{{
if (strpos($method, 'secure', 0) !== false) {
$this->authenticate();
}
if ($args[0] == 7 || date('D') == 'Mon') {
$method .= '_awesome';
$args[1]++;
}
}}}
I guess I could work around it by sending all XML-RPC requests to 1 method
and adding an extra arg, but that's a bit messy.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14933#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list