Hopefully final tweak for XXE to prevent displaying errors if SimpleXML isn't available
This commit is contained in:
parent
2f4fd4cdcb
commit
6c8884b2eb
|
@ -378,10 +378,10 @@ class PHPExcel_Settings
|
||||||
*/
|
*/
|
||||||
public static function getLibXmlLoaderOptions()
|
public static function getLibXmlLoaderOptions()
|
||||||
{
|
{
|
||||||
libxml_disable_entity_loader(true);
|
|
||||||
if (is_null(self::$_libXmlLoaderOptions)) {
|
if (is_null(self::$_libXmlLoaderOptions)) {
|
||||||
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
|
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
|
||||||
}
|
}
|
||||||
|
@libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
|
||||||
return self::$_libXmlLoaderOptions;
|
return self::$_libXmlLoaderOptions;
|
||||||
} // function getLibXmlLoaderOptions
|
} // function getLibXmlLoaderOptions
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue