Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

Commit 6c8884b

Browse files
author
Mark Baker
committed
Hopefully final tweak for XXE to prevent displaying errors if SimpleXML isn't available
1 parent 2f4fd4c commit 6c8884b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/PHPExcel/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,10 @@ public static function setLibXmlLoaderOptions($options = null)
378378
*/
379379
public static function getLibXmlLoaderOptions()
380380
{
381-
libxml_disable_entity_loader(true);
382381
if (is_null(self::$_libXmlLoaderOptions)) {
383382
self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
384383
}
384+
@libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
385385
return self::$_libXmlLoaderOptions;
386386
} // function getLibXmlLoaderOptions
387387
}

0 commit comments

Comments
 (0)