diff --git a/ChangeLog b/ChangeLog index 40771e767e..788b91c622 100644 --- a/ChangeLog +++ b/ChangeLog @@ -79,6 +79,7 @@ phpMyAdmin - ChangeLog - issue Field names and aliases are being correctly parsed now. - issue #11959 Fix javascript error in setup - issue #11964 Undefined index: TABLE_COMMENT in database structure page +- issue #11967 Fix PHP error on loading invalid XML or ODS file 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/libraries/plugins/import/ImportOds.php b/libraries/plugins/import/ImportOds.php index 6111b6fb6a..ee0bc5c3b9 100644 --- a/libraries/plugins/import/ImportOds.php +++ b/libraries/plugins/import/ImportOds.php @@ -18,15 +18,6 @@ use PMA; use PMA\libraries\plugins\ImportPlugin; use SimpleXMLElement; -/** - * We need way to disable external XML entities processing. - */ -if (!function_exists('libxml_disable_entity_loader')) { - $GLOBALS['skip_import'] = true; - - return; -} - /** * Handles the import for the ODS format * @@ -147,7 +138,7 @@ class ImportOds extends ImportPlugin * result in increased performance without the need to * alter the code in any way. It's basically a freebee. */ - $xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); + $xml = @simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); unset($buffer); diff --git a/libraries/plugins/import/ImportXml.php b/libraries/plugins/import/ImportXml.php index bc433c6182..2bc90814d7 100644 --- a/libraries/plugins/import/ImportXml.php +++ b/libraries/plugins/import/ImportXml.php @@ -15,15 +15,6 @@ use PMA; use PMA\libraries\plugins\ImportPlugin; use SimpleXMLElement; -/** - * We need way to disable external XML entities processing. - */ -if (!function_exists('libxml_disable_entity_loader')) { - $GLOBALS['skip_import'] = true; - - return; -} - /** * Handles the import for the XML format * @@ -104,7 +95,7 @@ class ImportXml extends ImportPlugin * result in increased performance without the need to * alter the code in any way. It's basically a freebee. */ - $xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); + $xml = @simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); unset($buffer);