diff options
| author | jvoisin | 2020-12-12 18:57:48 +0000 |
|---|---|---|
| committer | jvoisin | 2020-12-12 20:33:14 +0100 |
| commit | 5329a55bfd2b00d617a40d587cd37050d964ccbf (patch) | |
| tree | 81ba53c4f950442a904a437458228d1ab2859227 /src/tests/xxe/disable_xxe_dom.phpt | |
| parent | e34f5f5aaa4a40745bd652198d75b879aa09a53c (diff) | |
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
Diffstat (limited to 'src/tests/xxe/disable_xxe_dom.phpt')
| -rw-r--r-- | src/tests/xxe/disable_xxe_dom.phpt | 38 |
1 files changed, 22 insertions, 16 deletions
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 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable XXE | 2 | Disable XXE, in php8 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?> | 4 | <?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?> |
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disable_xxe.ini | 7 | sp.configuration_file={PWD}/config/disable_xxe.ini |
| 7 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| @@ -42,28 +43,33 @@ $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | |||
| 42 | printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | 43 | printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); |
| 43 | 44 | ||
| 44 | ?> | 45 | ?> |
| 46 | --CLEAN-- | ||
| 47 | <?php | ||
| 48 | $dir = __DIR__; | ||
| 49 | unlink($dir . "content.xml"); | ||
| 50 | unlink($dir . "content.txt"); | ||
| 51 | ?> | ||
| 45 | --EXPECTF-- | 52 | --EXPECTF-- |
| 46 | Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d | 53 | Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 47 | 54 | ||
| 48 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d | 55 | 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 |
| 49 | 56 | ||
| 50 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d | 57 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 51 | 58 | ||
| 52 | Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d | 59 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 60 | |||
| 61 | Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d | ||
| 53 | libxml_disable_entity to true: | 62 | libxml_disable_entity to true: |
| 54 | 63 | ||
| 55 | Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "file://%a/content.txt" in %a/disable_xxe_dom.php on line %d | 64 | Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 65 | |||
| 66 | 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 | ||
| 56 | 67 | ||
| 57 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d | 68 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 58 | 69 | ||
| 59 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d | 70 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: 6 in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 60 | 71 | ||
| 61 | Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d | 72 | Warning: Attempt to read property "nodeValue" on null in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 62 | libxml_disable_entity to false: | 73 | libxml_disable_entity to false: |
| 63 | without xxe: foo | 74 | |
| 64 | --CLEAN-- | 75 | Deprecated: Function libxml_disable_entity_loader() is deprecated in %s/tests/xxe/disable_xxe_dom.php on line %d |
| 65 | <?php | ||
| 66 | $dir = __DIR__; | ||
| 67 | unlink($dir . "content.xml"); | ||
| 68 | unlink($dir . "content.txt"); | ||
| 69 | ?> | ||
