Skip to content

Commit

Permalink
Try to make anti-xxe work better
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Sep 20, 2023
1 parent f672fa5 commit 1532682
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 71 deletions.
57 changes: 0 additions & 57 deletions src/tests/xxe/disable_xxe_dom_disabled.phpt

This file was deleted.

2 changes: 1 addition & 1 deletion src/tests/xxe/disable_xxe_dom_disabled_php8.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Disable XXE (feature disabled)
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?>
<?php if (!extension_loaded("snuffleupagus")) print("skip"); ?>
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disable_xxe_disable.ini
Expand Down
2 changes: 1 addition & 1 deletion src/tests/xxe/disable_xxe_dom_php8.phpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--TEST--
Disable XXE (feature enabled)
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?>
<?php if (!extension_loaded("snuffleupagus")) print("skip"); ?>
<?php if (PHP_VERSION_ID < 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disable_xxe.ini
Expand Down
3 changes: 1 addition & 2 deletions src/tests/xxe/disable_xxe_simplexml.phpt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
--TEST--
Disable XXE
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus") || !extension_loaded("simplexml")) print("skip"); ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
<?php if (!extension_loaded("snuffleupagus")) print("skip"); ?>
--INI--
sp.configuration_file={PWD}/config/disable_xxe_disable.ini
--EXTENSIONS--
Expand Down
3 changes: 1 addition & 2 deletions src/tests/xxe/disable_xxe_simplexml_oop.phpt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
--TEST--
Disable XXE
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus") || !extension_loaded("simplexml")) print("skip"); ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
<?php if (!extension_loaded("snuffleupagus")) echo "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disable_xxe_disable.ini
--EXTENSIONS--
Expand Down
9 changes: 1 addition & 8 deletions src/tests/xxe/disable_xxe_xml_parse.phpt
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
--TEST--
Disable XXE in xml_parse
--SKIPIF--
<?php
if (!extension_loaded("snuffleupagus")) {
echo "skip because snuffleupagus isn't loaded";
} elseif (!extension_loaded("xml")) {
echo "skip because the `xml` extension isn't loaded";
}
?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
<?php if (!extension_loaded("snuffleupagus")) print("skip"); ?>
--EXTENSIONS--
xml
--INI--
Expand Down

0 comments on commit 1532682

Please sign in to comment.