Skip to content

Commit

Permalink
Mark the relevant php8 tests as broken (#359)
Browse files Browse the repository at this point in the history
* Skip tests broken on php8

* Oops

* Fix some tests

* Add some XXE tests for php8

* Fix a test
  • Loading branch information
jvoisin committed Dec 12, 2020
1 parent e34f5f5 commit 5329a55
Show file tree
Hide file tree
Showing 170 changed files with 449 additions and 106 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.txt
tags
*.orig
*.gdbhistory
*.swp
Expand Down
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration pr
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf2.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration se
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration with allow broken turned off
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf.ini
sp.allow_broken_configuration=Off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration with allow broken turned on
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf.ini
sp.allow_broken_configuration=On
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_config_regexp.ini
--FILE--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration - regexp without a closing parenthesis
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the par
Fatal error: [snuffleupagus][0.0.0.0][config][log] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration - encrypted cookie without encryption key
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini
--FILE--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration - encrypted cookie with without cookie env var
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini
--FILE--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration - encrypted cookie with name and regexp
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutu
Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Global strict mode
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled
Fatal error: [snuffleupagus][0.0.0.0][config][log] A rule can't be enabled and disabled on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_eval.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration for eval
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_eval.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"cos,sin': it doesn't look like a valid string on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Bad boolean value in configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' a
Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_invalid_cidr.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4
Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid netw
Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration, invalid cidr for ipv6 because there is no `/` in it
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:000
Fatal error: [snuffleupagus][0.0.0.0][config][log] '2001:0db8:0000:0000:0000:ff00:0042:8329' isn't a valid network mask, it seems that you forgot a '/'. in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Broken configuration, invalid cidr value
(13337%128 = 25)
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini
--FILE--
Expand All @@ -15,4 +16,4 @@ Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is
Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration filename without absolute path
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("sprintf").filename("wrong file name").drop();':'.filename' must be an absolute path or a phar archive on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration filename with improper log media
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini
--FILE--
Expand Down
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_invalid_type.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken conf with wrong type
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"totally_wrong"_type")': it doesn't look like a valid string on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_key_value.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_key_value.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration li
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").var("").value("").key("").drop();':`key` and `value` are mutually exclusive on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Configuration line with an empty string
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as paramet
Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Configuration line without closing parenthese
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with th
Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"123"': it doesn't look like a valid string on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_10.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unkn
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_11.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unk
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_12.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini
--FILE--
Expand All @@ -11,4 +12,4 @@ PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on
Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_13.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unk
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_14.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid va
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
3 changes: 2 additions & 1 deletion src/tests/broken_configuration/broken_conf_local_var_15.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Broken configuration
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini
--FILE--
Expand All @@ -14,4 +15,4 @@ Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in
Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0

Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0
Could not startup.
Could not startup.
Loading

0 comments on commit 5329a55

Please sign in to comment.