summaryrefslogtreecommitdiff
path: root/src/tests/xxe
diff options
context:
space:
mode:
authorjvoisin2023-01-04 19:06:28 +0100
committerjvoisin2023-01-04 19:10:38 +0100
commit1bf0f3ec9088d34383c564d6306901ae6dc94cb5 (patch)
treed484c173bacd0e5c5d2847b43f99e99d26074019 /src/tests/xxe
parent0423e1b63364f4dd741d3a8ac8a880407ff37371 (diff)
Fix the CI for PHP8.2
Diffstat (limited to 'src/tests/xxe')
-rw-r--r--src/tests/xxe/disable_xxe_dom_disabled.phpt9
-rw-r--r--src/tests/xxe/disable_xxe_simplexml.phpt9
-rw-r--r--src/tests/xxe/disable_xxe_simplexml_oop.phpt9
-rw-r--r--src/tests/xxe/disable_xxe_xml_parse.phpt13
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>';
14file_put_contents($dir . '/content.txt', $content); 17file_put_contents($dir . '/content.txt', $content);
15 18
@@ -52,9 +55,3 @@ libxml_disable_entity to false: WARNING, external entity loaded!
52 55
53Warning: [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 56Warning: [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
54without xxe: foo 57without xxe: foo
55--CLEAN--
56<?php
57$dir = __DIR__;
58unlink($dir . "/content.xml");
59unlink($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!';
15file_put_contents('content.txt', $content); 18file_put_contents('content.txt', $content);
16 19
@@ -44,9 +47,3 @@ printf("without xxe: %s", $doc->testing);
44libxml_disable_entity to true: 47libxml_disable_entity to true:
45libxml_disable_entity to false: 48libxml_disable_entity to false:
46without xxe: foo 49without xxe: foo
47--CLEAN--
48<?php
49$dir = __DIR__;
50unlink($dir . "/content.xml");
51unlink($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!';
15file_put_contents('content.txt', $content); 18file_put_contents('content.txt', $content);
16 19
@@ -44,9 +47,3 @@ printf("without xxe: %s", $doc->testing);
44libxml_disable_entity to true: 47libxml_disable_entity to true:
45libxml_disable_entity to false: 48libxml_disable_entity to false:
46without xxe: foo 49without xxe: foo
47--CLEAN--
48<?php
49$dir = __DIR__;
50unlink($dir . "/content.xml");
51unlink($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!';
20file_put_contents('content.txt', $content); 23file_put_contents('content.txt', $content);
21 24
@@ -71,7 +74,7 @@ $doc = xml_parse($parser, $xml, true);
71xml_parser_free($parser); 74xml_parser_free($parser);
72 75
73--EXPECTF-- 76--EXPECTF--
74Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line 41 77Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line %d
75string(4) "TEST" 78string(4) "TEST"
76 79
77array(0) { 80array(0) {
@@ -83,7 +86,7 @@ array(0) {
83string(7) "TESTING" 86string(7) "TESTING"
84string(4) "TEST" 87string(4) "TEST"
85 88
86Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line 46 89Warning: [snuffleupagus][0.0.0.0][xxe][log] A call to libxml_disable_entity_loader was tried and nopped in %a.php on line %d
87string(4) "TEST" 90string(4) "TEST"
88 91
89array(0) { 92array(0) {
@@ -104,9 +107,3 @@ array(0) {
104} 107}
105textfoostring(7) "TESTING" 108textfoostring(7) "TESTING"
106string(4) "TEST" 109string(4) "TEST"
107--CLEAN--
108<?php
109$dir = __DIR__;
110unlink($dir . "/content.xml");
111unlink($dir . "/content.txt");
112?>