diff --git a/composer.json b/composer.json index b9a75e56..194f88be 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "source": "https://github.com/onelogin/php-saml/" }, "require": { - "php": ">=5.3.2", + "php": "^8.0.10", "ext-curl": "*", "ext-openssl": "*", "ext-dom": "*", @@ -26,12 +26,12 @@ "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "4.8", + "phpunit/phpunit": "8.5.19", "satooshi/php-coveralls": "1.0.1", "sebastian/phpcpd": "*", "phploc/phploc": "*", "pdepend/pdepend" : "1.1.0", - "squizlabs/php_codesniffer": "2.9.0" + "squizlabs/php_codesniffer": "3.6.0" }, "suggest": { "ext-gettext": "Install gettext and php5-gettext libs to handle translations" diff --git a/lib/Saml2/Utils.php b/lib/Saml2/Utils.php index 2669926d..f499dd72 100644 --- a/lib/Saml2/Utils.php +++ b/lib/Saml2/Utils.php @@ -88,9 +88,7 @@ public static function loadXML($dom, $xml) throw new Exception('Detected use of ENTITY in XML, disabled to prevent XXE/XEE attacks'); } - $oldEntityLoader = libxml_disable_entity_loader(true); $res = $dom->loadXML($xml); - libxml_disable_entity_loader($oldEntityLoader); if (!$res) { return false; @@ -131,9 +129,7 @@ public static function validateXML($xml, $schema, $debug = false) } $schemaFile = __DIR__.'/schemas/' . $schema; - $oldEntityLoader = libxml_disable_entity_loader(false); $res = $dom->schemaValidate($schemaFile); - libxml_disable_entity_loader($oldEntityLoader); if (!$res) { $xmlErrors = libxml_get_errors(); syslog(LOG_INFO, 'Error validating the metadata: '.var_export($xmlErrors, true));