diff options
| author | jvoisin | 2023-01-04 19:06:28 +0100 |
|---|---|---|
| committer | jvoisin | 2023-01-04 19:10:38 +0100 |
| commit | 1bf0f3ec9088d34383c564d6306901ae6dc94cb5 (patch) | |
| tree | d484c173bacd0e5c5d2847b43f99e99d26074019 /src/tests/xxe | |
| parent | 0423e1b63364f4dd741d3a8ac8a880407ff37371 (diff) | |
Fix the CI for PHP8.2
Diffstat (limited to 'src/tests/xxe')
| -rw-r--r-- | src/tests/xxe/disable_xxe_dom_disabled.phpt | 9 | ||||
| -rw-r--r-- | src/tests/xxe/disable_xxe_simplexml.phpt | 9 | ||||
| -rw-r--r-- | src/tests/xxe/disable_xxe_simplexml_oop.phpt | 9 | ||||
| -rw-r--r-- | src/tests/xxe/disable_xxe_xml_parse.phpt | 13 |
4 files changed, 14 insertions, 26 deletions
diff --git a/src/tests/xxe/disable_xxe_dom_disabled.phpt b/src/tests/xxe/disable_xxe_dom_disabled.phpt index 4a888ed..20399ec 100644 --- a/src/tests/xxe/disable_xxe_dom_disabled.phpt +++ b/src/tests/xxe/disable_xxe_dom_disabled.phpt | |||
| @@ -10,6 +10,9 @@ dom | |||
| 10 | --FILE-- | 10 | --FILE-- |
| 11 | <?php | 11 | <?php |
| 12 | $dir = __DIR__; | 12 | $dir = __DIR__; |
| 13 | @unlink($dir . "/content.xml"); | ||
| 14 | @unlink($dir . "/content.txt"); | ||
| 15 | |||
| 13 | $content = '<content>WARNING, external entity loaded!</content>'; | 16 | $content = '<content>WARNING, external entity loaded!</content>'; |
| 14 | file_put_contents($dir . '/content.txt', $content); | 17 | file_put_contents($dir . '/content.txt', $content); |
| 15 | 18 | ||
| @@ -52,9 +55,3 @@ libxml_disable_entity to false: WARNING, external entity loaded! | |||
| 52 | 55 | ||
| 53 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d | 56 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %s/tests/xxe/disable_xxe_dom_disabled.php on line %d |
| 54 | without xxe: foo | 57 | without xxe: foo |
| 55 | --CLEAN-- | ||
| 56 | <?php | ||
| 57 | $dir = __DIR__; | ||
| 58 | unlink($dir . "/content.xml"); | ||
| 59 | unlink($dir . "/content.txt"); | ||
| 60 | ?> | ||
diff --git a/src/tests/xxe/disable_xxe_simplexml.phpt b/src/tests/xxe/disable_xxe_simplexml.phpt index 9560156..8a4f033 100644 --- a/src/tests/xxe/disable_xxe_simplexml.phpt +++ b/src/tests/xxe/disable_xxe_simplexml.phpt | |||
| @@ -11,6 +11,9 @@ simplexml | |||
| 11 | --FILE-- | 11 | --FILE-- |
| 12 | <?php | 12 | <?php |
| 13 | $dir = __DIR__; | 13 | $dir = __DIR__; |
| 14 | @unlink($dir . "/content.xml"); | ||
| 15 | @unlink($dir . "/content.txt"); | ||
| 16 | |||
| 14 | $content = 'WARNING, external entity loaded!'; | 17 | $content = 'WARNING, external entity loaded!'; |
| 15 | file_put_contents('content.txt', $content); | 18 | file_put_contents('content.txt', $content); |
| 16 | 19 | ||
| @@ -44,9 +47,3 @@ printf("without xxe: %s", $doc->testing); | |||
| 44 | libxml_disable_entity to true: | 47 | libxml_disable_entity to true: |
| 45 | libxml_disable_entity to false: | 48 | libxml_disable_entity to false: |
| 46 | without xxe: foo | 49 | without xxe: foo |
| 47 | --CLEAN-- | ||
| 48 | <?php | ||
| 49 | $dir = __DIR__; | ||
| 50 | unlink($dir . "/content.xml"); | ||
| 51 | unlink($dir . "/content.txt"); | ||
| 52 | ?> | ||
diff --git a/src/tests/xxe/disable_xxe_simplexml_oop.phpt b/src/tests/xxe/disable_xxe_simplexml_oop.phpt index 1b2c4ca..c28c364 100644 --- a/src/tests/xxe/disable_xxe_simplexml_oop.phpt +++ b/src/tests/xxe/disable_xxe_simplexml_oop.phpt | |||
| @@ -11,6 +11,9 @@ simplexml | |||
| 11 | --FILE-- | 11 | --FILE-- |
| 12 | <?php | 12 | <?php |
| 13 | $dir = __DIR__; | 13 | $dir = __DIR__; |
| 14 | @unlink($dir . "/content.xml"); | ||
| 15 | @unlink($dir . "/content.txt"); | ||
| 16 | |||
| 14 | $content = 'WARNING, external entity loaded!'; | 17 | $content = 'WARNING, external entity loaded!'; |
| 15 | file_put_contents('content.txt', $content); | 18 | file_put_contents('content.txt', $content); |
| 16 | 19 | ||
| @@ -44,9 +47,3 @@ printf("without xxe: %s", $doc->testing); | |||
| 44 | libxml_disable_entity to true: | 47 | libxml_disable_entity to true: |
| 45 | libxml_disable_entity to false: | 48 | libxml_disable_entity to false: |
| 46 | without xxe: foo | 49 | without xxe: foo |
| 47 | --CLEAN-- | ||
| 48 | <?php | ||
| 49 | $dir = __DIR__; | ||
| 50 | unlink($dir . "/content.xml"); | ||
| 51 | unlink($dir . "/content.txt"); | ||
| 52 | ?> | ||
diff --git a/src/tests/xxe/disable_xxe_xml_parse.phpt b/src/tests/xxe/disable_xxe_xml_parse.phpt index bc7e338..4a8292d 100644 --- a/src/tests/xxe/disable_xxe_xml_parse.phpt +++ b/src/tests/xxe/disable_xxe_xml_parse.phpt | |||
| @@ -16,6 +16,9 @@ sp.configuration_file={PWD}/config/disable_xxe.ini | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php | 17 | <?php |
| 18 | $dir = __DIR__; | 18 | $dir = __DIR__; |
| 19 | @unlink($dir . "/content.xml"); | ||
| 20 | @unlink($dir . "/content.txt"); | ||
| 21 | |||
| 19 | $content = 'WARNING, external entity loaded!'; | 22 | $content = 'WARNING, external entity loaded!'; |
| 20 | file_put_contents('content.txt', $content); | 23 | file_put_contents('content.txt', $content); |
| 21 | 24 | ||
| @@ -71,7 +74,7 @@ $doc = xml_parse($parser, $xml, true); | |||
| 71 | xml_parser_free($parser); | 74 | xml_parser_free($parser); |
| 72 | 75 | ||
| 73 | --EXPECTF-- | 76 | --EXPECTF-- |
| 74 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line 41 | 77 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line %d |
| 75 | string(4) "TEST" | 78 | string(4) "TEST" |
| 76 | 79 | ||
| 77 | array(0) { | 80 | array(0) { |
| @@ -83,7 +86,7 @@ array(0) { | |||
| 83 | string(7) "TESTING" | 86 | string(7) "TESTING" |
| 84 | string(4) "TEST" | 87 | string(4) "TEST" |
| 85 | 88 | ||
| 86 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line 46 | 89 | Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line %d |
| 87 | string(4) "TEST" | 90 | string(4) "TEST" |
| 88 | 91 | ||
| 89 | array(0) { | 92 | array(0) { |
| @@ -104,9 +107,3 @@ array(0) { | |||
| 104 | } | 107 | } |
| 105 | textfoostring(7) "TESTING" | 108 | textfoostring(7) "TESTING" |
| 106 | string(4) "TEST" | 109 | string(4) "TEST" |
| 107 | --CLEAN-- | ||
| 108 | <?php | ||
| 109 | $dir = __DIR__; | ||
| 110 | unlink($dir . "/content.xml"); | ||
| 111 | unlink($dir . "/content.txt"); | ||
| 112 | ?> | ||
