From 5329a55bfd2b00d617a40d587cd37050d964ccbf Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 12 Dec 2020 18:57:48 +0000 Subject: Mark the relevant php8 tests as broken (#359) * Skip tests broken on php8 * Oops * Fix some tests * Add some XXE tests for php8 * Fix a test --- src/tests/xxe/disable_xxe_dom.phpt | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'src/tests/xxe/disable_xxe_dom.phpt') diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt index 58467f7..99ed572 100644 --- a/src/tests/xxe/disable_xxe_dom.phpt +++ b/src/tests/xxe/disable_xxe_dom.phpt @@ -1,7 +1,8 @@ --TEST-- -Disable XXE +Disable XXE, in php8 --SKIPIF-- + --INI-- sp.configuration_file={PWD}/config/disable_xxe.ini --EXTENSIONS-- @@ -41,29 +42,34 @@ $dom = new DOMDocument('1.0'); $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); +?> +--CLEAN-- + --EXPECTF-- -Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%s/tests/xxe/content.txt" in /var/www/html/snuffleupagus/src/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d -Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d + +Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d libxml_disable_entity to true: -Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d + +Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%s/tests/xxe/content.txt" in /var/www/html/snuffleupagus/src/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d -Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d +Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d -Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d +Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d libxml_disable_entity to false: -without xxe: foo ---CLEAN-- - + +Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d -- cgit v1.3