In WP_oEmbed
, only allow __call()
to run against a whitelist of methods, $compat_methods
.
See #30891. git-svn-id: https://develop.svn.wordpress.org/trunk@31148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5b6858eff8
commit
cd3fde69bb
@ -21,6 +21,8 @@ class WP_oEmbed {
|
||||
public $providers = array();
|
||||
public static $early_providers = array();
|
||||
|
||||
private $compat_methods = array( '_fetch_with_format', '_parse_json', '_parse_xml', '_parse_body' );
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -170,7 +172,10 @@ class WP_oEmbed {
|
||||
* @return mixed|bool Return value of the callback, false otherwise.
|
||||
*/
|
||||
public function __call( $name, $arguments ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
if ( in_array( $name, $this->compat_methods ) ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user