mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Disable external entities in ID3.
Built from https://develop.svn.wordpress.org/trunk@29378 git-svn-id: http://core.svn.wordpress.org/trunk@29156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4ecf30559b
commit
8b7beb2378
@ -519,11 +519,12 @@ class getid3_lib
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function XML2array($XMLstring) {
|
public static function XML2array($XMLstring) {
|
||||||
if (function_exists('simplexml_load_string')) {
|
if ( function_exists( 'simplexml_load_string' ) && function_exists( 'libxml_disable_entity_loader' ) ) {
|
||||||
if (function_exists('get_object_vars')) {
|
$loader = libxml_disable_entity_loader( true );
|
||||||
$XMLobject = simplexml_load_string($XMLstring);
|
$XMLobject = simplexml_load_string( $XMLstring, 'SimpleXMLElement', LIBXML_NOENT );
|
||||||
return self::SimpleXMLelement2array($XMLobject);
|
$return = self::SimpleXMLelement2array( $XMLobject );
|
||||||
}
|
libxml_disable_entity_loader( $loader );
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user