mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-29 08:46:03 +03:00
When libxmlloader options are teh default values, disable the entity loader as well. CVE-2014-2054 by MITRE
This commit is contained in:
parent
1dad681142
commit
fdc4532bc7
@ -366,6 +366,7 @@ class PHPExcel_Settings
|
|||||||
if (is_null($options)) {
|
if (is_null($options)) {
|
||||||
$options = LIBXML_DTDLOAD | LIBXML_DTDATTR;
|
$options = LIBXML_DTDLOAD | LIBXML_DTDATTR;
|
||||||
}
|
}
|
||||||
|
@libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
|
||||||
self::$_libXmlLoaderOptions = $options;
|
self::$_libXmlLoaderOptions = $options;
|
||||||
} // function setLibXmlLoaderOptions
|
} // function setLibXmlLoaderOptions
|
||||||
|
|
||||||
@ -378,8 +379,8 @@ class PHPExcel_Settings
|
|||||||
public static function getLibXmlLoaderOptions()
|
public static function getLibXmlLoaderOptions()
|
||||||
{
|
{
|
||||||
if (is_null(self::$_libXmlLoaderOptions)) {
|
if (is_null(self::$_libXmlLoaderOptions)) {
|
||||||
self::$_libXmlLoaderOptions = LIBXML_DTDLOAD | LIBXML_DTDATTR;
|
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
|
||||||
}
|
}
|
||||||
return self::$_libXmlLoaderOptions;
|
return self::$_libXmlLoaderOptions;
|
||||||
} // function getLibXmlLoaderOptions
|
} // function getLibXmlLoaderOptions
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user