diff options
| author | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
| commit | 5484bcb5eb2714e7438927e2566c86a74d7c51af (patch) | |
| tree | b78326d2999397be4c08e06b23209981f82a4ea9 /src/tests | |
| parent | 7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (diff) | |
| parent | cecfdd808da67be908dbe7144cc8c74dfb3f855e (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/tests')
452 files changed, 2443 insertions, 793 deletions
diff --git a/src/tests/broken_configuration/broken_conf.phpt b/src/tests/broken_configuration/broken_conf.phpt index ab79394..477ee64 100644 --- a/src/tests/broken_configuration/broken_conf.phpt +++ b/src/tests/broken_configuration/broken_conf.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 7 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf2.phpt b/src/tests/broken_configuration/broken_conf2.phpt index 919cd7b..4e67b9f 100644 --- a/src/tests/broken_configuration/broken_conf2.phpt +++ b/src/tests/broken_configuration/broken_conf2.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf2.ini | 7 | sp.configuration_file={PWD}/config/broken_conf2.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt index 9cc45bf..e2ffab0 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration with allow broken turned off | 2 | Broken configuration with allow broken turned off |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 7 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | sp.allow_broken_configuration=Off | 8 | sp.allow_broken_configuration=Off |
| @@ -10,9 +11,9 @@ sp.allow_broken_configuration=Off | |||
| 10 | echo 1337; | 11 | echo 1337; |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECT-- | 13 | --EXPECT-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 14 | PHP 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 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 16 | 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 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. | 19 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt index 614032a..68938fe 100644 --- a/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt +++ b/src/tests/broken_configuration/broken_conf_allow_broken_enabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration with allow broken turned on | 2 | Broken configuration with allow broken turned on |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf.ini | 7 | sp.configuration_file={PWD}/config/broken_conf.ini |
| 7 | sp.allow_broken_configuration=On | 8 | sp.allow_broken_configuration=On |
| @@ -10,7 +11,7 @@ sp.allow_broken_configuration=On | |||
| 10 | echo 1337; | 11 | echo 1337; |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECT-- | 13 | --EXPECT-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 14 | PHP 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 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration prefix for 'this is a broken line' on line 1 in Unknown on line 0 | 16 | 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 |
| 16 | 1337 | 17 | 1337 |
diff --git a/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt b/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt new file mode 100644 index 0000000..ac85dea --- /dev/null +++ b/src/tests/broken_configuration/broken_conf_config_invalid_param.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with invalid parameter warning | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/broken_conf_config_invalid_param.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foo($blah, $x = null, $y = null) { | ||
| 10 | echo "ok"; | ||
| 11 | } | ||
| 12 | |||
| 13 | foo("qwe"); | ||
| 14 | --EXPECTF-- | ||
| 15 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you are filtering on a parameter 'qwe' of the function 'foo', but the parameter does not exists. in %s/tests/broken_configuration/broken_conf_config_invalid_param.php on line %d | ||
| 16 | ok | ||
diff --git a/src/tests/broken_configuration/broken_conf_config_regexp.phpt b/src/tests/broken_configuration/broken_conf_config_regexp.phpt index d056e74..ff6280e 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 11 | PHP 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 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 15 | 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 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt index 1792cdd..8644dfe 100644 --- a/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt +++ b/src/tests/broken_configuration/broken_conf_config_regexp_no_closing_paren.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration - regexp without a closing parenthesis | 2 | Broken configuration - regexp without a closing parenthesis |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini | 7 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 11 | PHP 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 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 15 | 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 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt index f3dc06f..857c803 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_encryption_key.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie without encryption key | 2 | Broken configuration - encrypted cookie without encryption key |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt index 882b4f7..de97a9d 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_encryption_without_env_var.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie with without cookie env var | 2 | Broken configuration - encrypted cookie with without cookie env var |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt index 50bc569..141cf77 100644 --- a/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt +++ b/src/tests/broken_configuration/broken_conf_cookie_name_and_regexp.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie with name and regexp | 2 | Broken configuration - encrypted cookie with name and regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_enable_disable.phpt b/src/tests/broken_configuration/broken_conf_enable_disable.phpt index 48ec954..eeba04a 100644 --- a/src/tests/broken_configuration/broken_conf_enable_disable.phpt +++ b/src/tests/broken_configuration/broken_conf_enable_disable.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Global strict mode | 2 | Global strict mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini | 7 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_eval.phpt b/src/tests/broken_configuration/broken_conf_eval.phpt index e1e05bc..791795a 100644 --- a/src/tests/broken_configuration/broken_conf_eval.phpt +++ b/src/tests/broken_configuration/broken_conf_eval.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration for eval | 2 | Broken configuration for eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_eval.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_eval.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] 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 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] 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 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt index 38a648d..4857ebe 100644 --- a/src/tests/broken_configuration/broken_conf_expecting_bool.phpt +++ b/src/tests/broken_configuration/broken_conf_expecting_bool.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad boolean value in configuration | 2 | Bad boolean value in configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '337);' at the end of '.enable(1337);' on line 5 in Unknown on line 0 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt index e23b880..e618676 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] '42' isn't a valid ipv4 mask. in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt index b8721b1..34a0d30 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt index cbc609e..8703dff 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr6_no_slash.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration, invalid cidr for ipv6 because there is no `/` in it | 2 | Broken configuration, invalid cidr for ipv6 because there is no `/` in it |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '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 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] '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 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt index 3372409..1424853 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_cidr_value.phpt | |||
| @@ -3,16 +3,17 @@ Broken configuration, invalid cidr value | |||
| 3 | (13337%128 = 25) | 3 | (13337%128 = 25) |
| 4 | --SKIPIF-- | 4 | --SKIPIF-- |
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 6 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 6 | --INI-- | 7 | --INI-- |
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini | 8 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini |
| 8 | --FILE-- | 9 | --FILE-- |
| 9 | --EXPECT-- | 10 | --EXPECT-- |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | 12 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. \ No newline at end of file | 19 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt index 1bc6564..b9a904c 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_filename.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_filename.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken configuration filename without absolute path | 2 | Broken configuration filename without absolute path |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] 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 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] 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 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt index a162ea8..c1c2668 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_log_media.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken configuration filename with improper log media | 2 | Broken configuration filename with improper log media |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_invalid_type.phpt b/src/tests/broken_configuration/broken_conf_invalid_type.phpt index cc4a381..aeb6b85 100644 --- a/src/tests/broken_configuration/broken_conf_invalid_type.phpt +++ b/src/tests/broken_configuration/broken_conf_invalid_type.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken conf with wrong type | 2 | Broken conf with wrong type |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] 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 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] 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 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_key_value.phpt b/src/tests/broken_configuration/broken_conf_key_value.phpt index 14a3d91..ec87d93 100644 --- a/src/tests/broken_configuration/broken_conf_key_value.phpt +++ b/src/tests/broken_configuration/broken_conf_key_value.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] 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 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] 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 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt index 15c11fd..3790d83 100644 --- a/src/tests/broken_configuration/broken_conf_line_empty_string.phpt +++ b/src/tests/broken_configuration/broken_conf_line_empty_string.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line with an empty string | 2 | Configuration line with an empty string |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt index c8ba73b..0f51dcf 100644 --- a/src/tests/broken_configuration/broken_conf_line_no_closing.phpt +++ b/src/tests/broken_configuration/broken_conf_line_no_closing.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line without closing parenthese | 2 | Configuration line without closing parenthese |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] 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 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] 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 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_1.phpt b/src/tests/broken_configuration/broken_conf_local_var_1.phpt index 573246c..851d532 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_1.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_1.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ']' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_10.phpt b/src/tests/broken_configuration/broken_conf_local_var_10.phpt index 2cf19f9..747cc5a 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_10.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_10.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_11.phpt b/src/tests/broken_configuration/broken_conf_local_var_11.phpt index bd018e4..11ca562 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_11.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_11.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `::` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `::` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_12.phpt b/src/tests/broken_configuration/broken_conf_local_var_12.phpt index 2c86d57..962f5ab 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_12.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_12.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Empty value in `var` on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Empty value in `var` on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_13.phpt b/src/tests/broken_configuration/broken_conf_local_var_13.phpt index a42507d..5c33fdd 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_13.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_13.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_14.phpt b/src/tests/broken_configuration/broken_conf_local_var_14.phpt index 01c9228..a831ef7 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_14.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_14.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i+valid var name . in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 | 11 | PHP 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 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i+valid var name . in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i+valid var name ' for `var` on line 1 in Unknown on line 0 | 15 | 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 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_15.phpt b/src/tests/broken_configuration/broken_conf_local_var_15.phpt index 8fca43a..5d8c6f1 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_15.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_15.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i$$!@#. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid var name: $i$$!@#. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_16.phpt b/src/tests/broken_configuration/broken_conf_local_var_16.phpt index 38f2030..47c1f17 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_16.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_16.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Missing a closing quote. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Missing a closing quote. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_2.phpt b/src/tests/broken_configuration/broken_conf_local_var_2.phpt index 64bdaf3..ec7ac2c 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_2.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_2.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_3.phpt b/src/tests/broken_configuration/broken_conf_local_var_3.phpt index e041ad5..776cee0 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_3.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_3.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_4.phpt b/src/tests/broken_configuration/broken_conf_local_var_4.phpt index 1c3f673..4390640 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_4.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_4.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `"` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_5.phpt b/src/tests/broken_configuration/broken_conf_local_var_5.phpt index 113ab39..a73056e 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_5.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_5.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_6.phpt b/src/tests/broken_configuration/broken_conf_local_var_6.phpt index 3d06667..19b2915 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_6.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_6.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `'` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_7.phpt b/src/tests/broken_configuration/broken_conf_local_var_7.phpt index 11c3da9..62e983f 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_7.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_7.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `->` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_8.phpt b/src/tests/broken_configuration/broken_conf_local_var_8.phpt index 2154284..1d170d2 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_8.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_8.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_local_var_9.phpt b/src/tests/broken_configuration/broken_conf_local_var_9.phpt index ab6ae78..5786e02 100644 --- a/src/tests/broken_configuration/broken_conf_local_var_9.phpt +++ b/src/tests/broken_configuration/broken_conf_local_var_9.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt index e69da0b..bef62b9 100644 --- a/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_lots_of_quotes.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line with too many quotes | 2 | Configuration line with too many quotes |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_missing_script.phpt b/src/tests/broken_configuration/broken_conf_missing_script.phpt index 97d3743..9deffc7 100644 --- a/src/tests/broken_configuration/broken_conf_missing_script.phpt +++ b/src/tests/broken_configuration/broken_conf_missing_script.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for upload | 2 | Invalid configuration file for upload |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_missing_script.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt index d76798b..a8036d2 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.value' and '.regexp' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt index 9ac8881..932f584 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive10.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - enabled/disabled readonly | 2 | Broken configuration - enabled/disabled readonly |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt index 69b2e31..62ae64e 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive11.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - ret and var are mutually exclusives | 2 | Broken configuration - ret and var are mutually exclusives |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt index dac0f16..28b0564 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive12.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - ret and value are mutually exclusive | 2 | Broken configuration - ret and value are mutually exclusive |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt index 6e71f83..cc3a951 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive2.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt index 46c589b..ab50266 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive3.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt index 84c814b..b848d1a 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive4.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt index e8c1f75..c668643 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive5.phpt | |||
| @@ -2,10 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 |
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 15 | Could not startup. | ||
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt index bbbb179..94ed765 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive6.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt index ecd39a0..2a16d0c 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive7.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt index f9e4692..129707d 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive8.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt index 0b574eb..b384d77 100644 --- a/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt +++ b/src/tests/broken_configuration/broken_conf_mutually_exclusive9.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - enabled/disabled unserialize | 2 | Broken configuration - enabled/disabled unserialize |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 10 | PHP 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 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 12 | 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 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt index d2ee961..62831d4 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_action.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad config, invalid action. | 2 | Bad config, invalid action. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt index ec82655..51d2980 100644 --- a/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt +++ b/src/tests/broken_configuration/broken_conf_no_cookie_name.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Borken configuration - encrypted cookie with no name | 2 | Broken configuration - encrypted cookie with no name |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini | 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You must specify a cookie name/regexp on line 2 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt index 98ec80c..cb2d95f 100644 --- a/src/tests/broken_configuration/broken_conf_no_file_specified.phpt +++ b/src/tests/broken_configuration/broken_conf_no_file_specified.phpt | |||
| @@ -6,5 +6,5 @@ Broken configuration - No configuration file specified | |||
| 6 | --FILE-- | 6 | --FILE-- |
| 7 | <?php echo "1\n"; ?> | 7 | <?php echo "1\n"; ?> |
| 8 | --EXPECT-- | 8 | --EXPECT-- |
| 9 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 9 | Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 |
| 10 | Could not startup. | 10 | 1 |
diff --git a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt index b518295..fa891d8 100644 --- a/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt +++ b/src/tests/broken_configuration/broken_conf_nonexisting_script.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for upload | 2 | Invalid configuration file for upload |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_quotes.phpt b/src/tests/broken_configuration/broken_conf_quotes.phpt index 86fac81..5b7b839 100644 --- a/src/tests/broken_configuration/broken_conf_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_quotes.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Broken configuration - missing quote | 2 | Broken configuration - missing quote |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You forgot to close a bracket. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] You forgot to close a bracket. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt index ca92aab..78b2b9a 100644 --- a/src/tests/broken_configuration/broken_conf_readonly_exec.phpt +++ b/src/tests/broken_configuration/broken_conf_readonly_exec.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for readonly_exec | 2 | Invalid configuration file for readonly_exec |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_samesite.phpt b/src/tests/broken_configuration/broken_conf_samesite.phpt index f325891..e4940c9 100644 --- a/src/tests/broken_configuration/broken_conf_samesite.phpt +++ b/src/tests/broken_configuration/broken_conf_samesite.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad config, invalid samesite type. | 2 | Bad config, invalid samesite type. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_session_encryption.phpt b/src/tests/broken_configuration/broken_conf_session_encryption.phpt index a010bd1..9dbedc1 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken config, session encryption | 2 | Broken config, session encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt index f958595..c638f80 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_encryption_key.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - encrypted session without encryption key | 2 | Broken configuration - encrypted session without encryption key |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt index 0f6f744..d503942 100644 --- a/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt +++ b/src/tests/broken_configuration/broken_conf_session_encryption_without_env_var.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Broken configuration - encrypted session without env var | 2 | Broken configuration - encrypted session without env var |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt index c5c26c0..1ad0afb 100644 --- a/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt +++ b/src/tests/broken_configuration/broken_conf_shown_in_phpinfo.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration | 2 | Broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -17,12 +18,12 @@ if (strstr($info, 'Valid config => no') !== FALSE) { | |||
| 17 | } | 18 | } |
| 18 | ?> | 19 | ?> |
| 19 | --EXPECTF-- | 20 | --EXPECTF-- |
| 20 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 21 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 21 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 22 | PHP 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 |
| 22 | 23 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '*.': %s on line 1. in Unknown on line 0 | 24 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 |
| 24 | 25 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][config] '.filename_r()' is expecting a valid regexp, and not '"*."' on line 1 in Unknown on line 0 | 26 | 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 |
| 26 | 27 | ||
| 27 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 28 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 28 | Could not startup. | 29 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_truncated.phpt b/src/tests/broken_configuration/broken_conf_truncated.phpt index ac0cbb3..6deff87 100644 --- a/src/tests/broken_configuration/broken_conf_truncated.phpt +++ b/src/tests/broken_configuration/broken_conf_truncated.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Bad boolean value in configuration | 2 | Bad boolean value in configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini | 7 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_unserialize.phpt b/src/tests/broken_configuration/broken_conf_unserialize.phpt index b1c26a3..a42d8a1 100644 --- a/src/tests/broken_configuration/broken_conf_unserialize.phpt +++ b/src/tests/broken_configuration/broken_conf_unserialize.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for unserialize | 2 | Invalid configuration file for unserialize |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_unserialize.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_upload_validation.phpt b/src/tests/broken_configuration/broken_conf_upload_validation.phpt index 47a2dd0..4b65339 100644 --- a/src/tests/broken_configuration/broken_conf_upload_validation.phpt +++ b/src/tests/broken_configuration/broken_conf_upload_validation.phpt | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid configuration file for upload validation | 2 | Invalid configuration file for upload validation |
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 3 | --INI-- | 5 | --INI-- |
| 4 | file_uploads=1 | 6 | file_uploads=1 |
| 5 | sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | 7 | sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini |
| @@ -8,9 +10,9 @@ sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | |||
| 8 | echo 1; | 10 | echo 1; |
| 9 | ?> | 11 | ?> |
| 10 | --EXPECTF-- | 12 | --EXPECTF-- |
| 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 12 | 14 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][error] A valid string as parameter is expected on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 |
| 14 | 16 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 16 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt index e560c21..ce568af 100644 --- a/src/tests/broken_configuration/broken_conf_weird_keyword.phpt +++ b/src/tests/broken_configuration/broken_conf_weird_keyword.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Bad config, unknown keyword | 2 | Bad config, unknown keyword |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt index d0b7427..2d1feeb 100644 --- a/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt +++ b/src/tests/broken_configuration/broken_conf_wrapper_whitelist.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Broken configuration with invalid token for wrapper whitelist | 2 | Broken configuration with invalid token for wrapper whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini |
| 7 | sp.allow_broken_configuration=Off | 8 | sp.allow_broken_configuration=Off |
| @@ -10,9 +11,9 @@ sp.allow_broken_configuration=Off | |||
| 10 | echo 1337; | 11 | echo 1337; |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECT-- | 13 | --EXPECT-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 | 14 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. | 19 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt index 52ea8d7..3753989 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_quotes.phpt | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | Configuration line with too many quotes | 2 | Configuration line with too many quotes |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECT-- | 9 | --EXPECT-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_conf_wrong_type.phpt b/src/tests/broken_configuration/broken_conf_wrong_type.phpt index 60dde56..b204968 100644 --- a/src/tests/broken_configuration/broken_conf_wrong_type.phpt +++ b/src/tests/broken_configuration/broken_conf_wrong_type.phpt | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken conf with wrong type | 2 | Broken conf with wrong type |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini | 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 |
| 10 | 11 | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 | 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 |
| 12 | 13 | ||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 14 | Could not startup. \ No newline at end of file | 15 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt index 8e445e7..a96b059 100644 --- a/src/tests/broken_configuration/broken_invalid_client_ip4.phpt +++ b/src/tests/broken_configuration/broken_invalid_client_ip4.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Invalid client IP | 2 | Invalid client IP |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=xyz | 7 | REMOTE_ADDR=xyz |
| @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | |||
| 13 | strpos("1337", "1"); | 13 | strpos("1337", "1"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][xyz][cidr_match] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][xyz][cidr_match][log] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file |
diff --git a/src/tests/broken_configuration/broken_regexp.phpt b/src/tests/broken_configuration/broken_regexp.phpt index 28d803e..83c7103 100644 --- a/src/tests/broken_configuration/broken_regexp.phpt +++ b/src/tests/broken_configuration/broken_regexp.phpt | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken regexp | 2 | Broken regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/broken_regexp.ini | 7 | sp.configuration_file={PWD}/config/broken_regexp.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/broken_unmatching_brackets.phpt b/src/tests/broken_configuration/broken_unmatching_brackets.phpt index 6c63303..ba14ff3 100644 --- a/src/tests/broken_configuration/broken_unmatching_brackets.phpt +++ b/src/tests/broken_configuration/broken_unmatching_brackets.phpt | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Broken configuration - unmatching brackets | 2 | Broken configuration - unmatching brackets |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini | 7 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | --EXPECTF-- | 9 | --EXPECTF-- |
| 9 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid `]` position. in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. \ No newline at end of file | 18 | Could not startup. |
diff --git a/src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini b/src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini new file mode 100644 index 0000000..22894c8 --- /dev/null +++ b/src/tests/broken_configuration/config/broken_conf_config_invalid_param.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("foo").param("qwe").value("abc").drop() | |||
diff --git a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt index c0fe5e4..7a8c909 100644 --- a/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt +++ b/src/tests/broken_configuration/encrypt_regexp_cookies_bad_regexp.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption in ipv4 | 2 | Cookie decryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini |
| 7 | error_reporting=1 | 7 | error_reporting=1 |
| @@ -15,8 +15,8 @@ EOF; | |||
| 15 | --FILE-- | 15 | --FILE-- |
| 16 | <?php var_dump($_COOKIE); ?> | 16 | <?php var_dump($_COOKIE); ?> |
| 17 | --EXPECT-- | 17 | --EXPECT-- |
| 18 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][127.0.0.1][config] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 | 20 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 |
| 21 | 21 | ||
| 22 | Fatal error: [snuffleupagus][127.0.0.1][config] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 | 22 | Fatal error: [snuffleupagus][127.0.0.1][config][log] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 |
diff --git a/src/tests/broken_configuration_php8/broken_conf.phpt b/src/tests/broken_configuration_php8/broken_conf.phpt new file mode 100644 index 0000000..7dde7d6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf2.phpt b/src/tests/broken_configuration_php8/broken_conf2.phpt new file mode 100644 index 0000000..bf337b4 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf2.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf2.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration section 'sp.wrong' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt b/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt new file mode 100644 index 0000000..9dd0c66 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_allow_broken_disabled.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with allow broken turned off | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf.ini | ||
| 8 | sp.allow_broken_configuration=Off | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | echo 1337; | ||
| 12 | ?> | ||
| 13 | --EXPECT-- | ||
| 14 | |||
| 15 | 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 | ||
| 16 | |||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 18 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt b/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt new file mode 100644 index 0000000..eccc8a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_allow_broken_enabled.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with allow broken turned on | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf.ini | ||
| 8 | sp.allow_broken_configuration=On | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | echo 1337; | ||
| 12 | ?> | ||
| 13 | --EXPECT-- | ||
| 14 | |||
| 15 | 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 | ||
| 16 | 1337 | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt b/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt new file mode 100644 index 0000000..76ef208 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_config_regexp.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
| 12 | |||
| 13 | 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 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt b/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt new file mode 100644 index 0000000..5bdca06 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_config_regexp_no_closing_paren.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - regexp without a closing parenthesis | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_config_regexp_no_closing_paren.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"*."': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | 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 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt new file mode 100644 index 0000000..0447320 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_encryption_key.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie without encryption key | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_encryption_key.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt new file mode 100644 index 0000000..204430d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_encryption_without_env_var.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie with without cookie env var | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_encryption_without_env_var.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt b/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt new file mode 100644 index 0000000..8648b4f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_cookie_name_and_regexp.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie with name and regexp | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_name_and_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] name and name_r are mutually exclusive on line 2 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt b/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt new file mode 100644 index 0000000..54e4d32 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_enable_disable.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Global strict mode | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/borken_conf_enable_disable.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_eval.phpt b/src/tests/broken_configuration_php8/broken_conf_eval.phpt new file mode 100644 index 0000000..1a6ad4d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_eval.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration for eval | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_eval.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt b/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt new file mode 100644 index 0000000..682a4f5 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_expecting_bool.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad boolean value in configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_expecting_bool.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt new file mode 100644 index 0000000..f66d8b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '42' isn't a valid ipv4 mask. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt new file mode 100644 index 0000000..91bd4a2 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] 'ZZZ' isn't a valid network mask. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt new file mode 100644 index 0000000..c6c8231 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_no_slash.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration, invalid cidr for ipv6 because there is no `/` in it | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_no_slash.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt new file mode 100644 index 0000000..47d4a5d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr6_too_big.phpt | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration, cidr for ipv6 is too big, that will `mod` to 25. | ||
| 3 | (13337%128 = 25) | ||
| 4 | --SKIPIF-- | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr6_too_big.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt new file mode 100644 index 0000000..dbe5414 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_cidr_value.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration, invalid cidr value | ||
| 3 | (13337%128 = 25) | ||
| 4 | --SKIPIF-- | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 7 | --INI-- | ||
| 8 | sp.configuration_file={PWD}/config/broken_conf_invalid_cidr_value.ini | ||
| 9 | --FILE-- | ||
| 10 | --EXPECT-- | ||
| 11 | |||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] " doesn't contain a valid cidr on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt new file mode 100644 index 0000000..cb78f85 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_filename.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration filename without absolute path | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_filename.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt new file mode 100644 index 0000000..68581b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_log_media.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration filename with improper log media | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_log_media.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] .log_media() only supports 'syslog' or 'php', on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt b/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt new file mode 100644 index 0000000..188d610 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_invalid_type.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken conf with wrong type | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_invalid_type.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_key_value.phpt b/src/tests/broken_configuration_php8/broken_conf_key_value.phpt new file mode 100644 index 0000000..1b51bd7 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_key_value.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_key_value.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt b/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt new file mode 100644 index 0000000..2d370ac --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_line_empty_string.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line with an empty string | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_line_empty_string.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt b/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt new file mode 100644 index 0000000..d3c826f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_line_no_closing.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line without closing parenthese | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_line_no_closing.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt new file mode 100644 index 0000000..52cd962 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_1.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_1.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ']' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt new file mode 100644 index 0000000..7817a19 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_10.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_10.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt new file mode 100644 index 0000000..06099a5 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_11.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_11.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `::` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd::' for `param` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt new file mode 100644 index 0000000..df753df --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_12.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_12.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Empty value in `var` on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt new file mode 100644 index 0000000..80bc068 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_13.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_13.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd->asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt new file mode 100644 index 0000000..749c317 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_14.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_14.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i+valid var name . in Unknown on line 0 | ||
| 12 | |||
| 13 | 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 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt new file mode 100644 index 0000000..97eab54 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_15.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_15.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid var name: $i$$!@#. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$i$$!@#->qwe' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt new file mode 100644 index 0000000..c643144 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_16.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_16.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Missing a closing quote. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt new file mode 100644 index 0000000..8b769af --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_2.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_2.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '""asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt new file mode 100644 index 0000000..850a977 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_3.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_3.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '$qwe->::' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt new file mode 100644 index 0000000..5146590 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_4.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_4.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `"` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '"asd"asd[]' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt new file mode 100644 index 0000000..a7f8183 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_5.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_5.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value ''asd'asd[]' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt new file mode 100644 index 0000000..283cb41 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_6.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_6.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `'` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '''asd' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt new file mode 100644 index 0000000..223e599 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_7.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_7.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `->` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd-->' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt new file mode 100644 index 0000000..058b5dd --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_8.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_8.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]"asd"' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt b/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt new file mode 100644 index 0000000..c1eeae6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_local_var_9.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_local_var_9.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'asd[asd]'asd'' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt new file mode 100644 index 0000000..e599e62 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_lots_of_quotes.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line with too many quotes | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_lots_of_quotes.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"this\"is a weird\"\"\"cookie\"name"");': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt b/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt new file mode 100644 index 0000000..2ddb70f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_missing_script.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for upload | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_missing_script.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` directive is mandatory in '.enable();' on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt new file mode 100644 index 0000000..800cffa --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").value_r("^id$").drop();': '.r_value' and '.value' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt new file mode 100644 index 0000000..c863bf9 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive10.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - enabled/disabled readonly | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive10.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt new file mode 100644 index 0000000..6bdb959 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive11.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - ret and var are mutually exclusives | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive11.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").var("hop");':`ret` and `var` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt new file mode 100644 index 0000000..1855fca --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive12.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - ret and value are mutually exclusive | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive12.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("strcmp").drop().ret("hip").value("hop");':`ret` and `value` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt new file mode 100644 index 0000000..286ea04 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive2.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive2.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").function_r("system").param("id").value("42").drop();': '.r_function' and '.function' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt new file mode 100644 index 0000000..b377179 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive3.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive3.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop();': '.r_filename' and '.filename' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt new file mode 100644 index 0000000..5f22a47 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive4.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt new file mode 100644 index 0000000..55d0eda --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive5.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive5.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().ret_r("^0$");': '.r_ret' and '.ret' are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt new file mode 100644 index 0000000..7dc6985 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive6.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive6.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").ret_r("^0$").drop();':`ret` and `param` are mutually exclusive on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt new file mode 100644 index 0000000..ff7f415 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive7.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive7.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.function("system").ret("0").drop().allow();': The rule must either be a `drop` or `allow` one on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt new file mode 100644 index 0000000..6ccd508 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive8.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive8.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration line: 'sp.disabled_functions.ret("0").drop();': must take a function name on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt new file mode 100644 index 0000000..e4a2d6f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_mutually_exclusive9.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - enabled/disabled unserialize | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive9.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | 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 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt b/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt new file mode 100644 index 0000000..5fb3f0b --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_cookie_action.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad config, invalid action. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_action.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a at least one action to a cookie on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt b/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt new file mode 100644 index 0000000..1b2922b --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_cookie_name.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted cookie with no name | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies_noname.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You must specify a cookie name/regexp on line 2 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt b/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt new file mode 100644 index 0000000..cb2d95f --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_no_file_specified.phpt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - No configuration file specified | ||
| 3 | --INI-- | ||
| 4 | --SKIPIF-- | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | --FILE-- | ||
| 7 | <?php echo "1\n"; ?> | ||
| 8 | --EXPECT-- | ||
| 9 | Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 | ||
| 10 | 1 | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt b/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt new file mode 100644 index 0000000..21717a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_nonexisting_script.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for upload | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_nonexisting_script.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (./non_existing_script.sh) doesn't exist on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_quotes.phpt new file mode 100644 index 0000000..d437669 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_quotes.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - missing quote | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_quotes.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You forgot to close a bracket. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value '_SERVER[PHP_SELF' for `var` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt b/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt new file mode 100644 index 0000000..7e74683 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_readonly_exec.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for readonly_exec | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_readonly_exec.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_samesite.phpt b/src/tests/broken_configuration_php8/broken_conf_samesite.phpt new file mode 100644 index 0000000..c905fd8 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_samesite.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad config, invalid samesite type. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_cookie_samesite.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] nop is an invalid value to samesite (expected Lax or Strict) on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt new file mode 100644 index 0000000..886eb13 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken config, session encryption | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars 'nvalid value :/);' at the end of '.encrypt(invalid value :/);' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt new file mode 100644 index 0000000..046dc7d --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_encryption_key.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted session without encryption key | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_encryption_key.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.secret_key` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt new file mode 100644 index 0000000..bb0f212 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_session_encryption_without_env_var.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - encrypted session without env var | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_session_encryption_without_env_var.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] You're trying to use the session cookie encryption feature on line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt b/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt new file mode 100644 index 0000000..2503943 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_shown_in_phpinfo.phpt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_config_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | ob_start(); | ||
| 11 | phpinfo(); | ||
| 12 | $info = ob_get_clean(); | ||
| 13 | ob_get_clean(); | ||
| 14 | if (strstr($info, 'Valid config => no') !== FALSE) { | ||
| 15 | echo "win"; | ||
| 16 | } else { | ||
| 17 | echo "lose"; | ||
| 18 | } | ||
| 19 | ?> | ||
| 20 | --EXPECTF-- | ||
| 21 | |||
| 22 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '*.': %s on line 1. in Unknown on line 0 | ||
| 23 | |||
| 24 | 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 | ||
| 25 | |||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 27 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_truncated.phpt b/src/tests/broken_configuration_php8/broken_conf_truncated.phpt new file mode 100644 index 0000000..059dcac --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_truncated.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad boolean value in configuration | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_broken_conf_truncated.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt b/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt new file mode 100644 index 0000000..327b622 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_unserialize.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for unserialize | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_unserialize.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '234);' at the end of '.enable(1234);' on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt b/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt new file mode 100644 index 0000000..9edede6 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_upload_validation.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid configuration file for upload validation | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | file_uploads=1 | ||
| 7 | sp.configuration_file={PWD}/config/borken_conf_upload_validation.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | echo 1; | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | |||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][error][log] A valid string as parameter is expected on line 1 in Unknown on line 0 | ||
| 15 | |||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 17 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt b/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt new file mode 100644 index 0000000..75c2e0e --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_weird_keyword.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Bad config, unknown keyword | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_weird_keyword.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.not_a_valid_keyword("test");' at the end of '.enable().not_a_valid_keyword("test");' on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt b/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt new file mode 100644 index 0000000..0011a6e --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrapper_whitelist.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration with invalid token for wrapper whitelist | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_wrapper_whitelist.ini | ||
| 8 | sp.allow_broken_configuration=Off | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | echo 1337; | ||
| 12 | ?> | ||
| 13 | --EXPECT-- | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Trailing chars '.invalid_param();' at the end of '.invalid_param();' on line 1 in Unknown on line 0 | ||
| 16 | |||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 18 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt b/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt new file mode 100644 index 0000000..b073369 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrong_quotes.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Configuration line with too many quotes | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_quotes.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECT-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] There is an issue with the parsing of '"\)': it doesn't look like a valid string on line 1 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt b/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt new file mode 100644 index 0000000..1f1cead --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_conf_wrong_type.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken conf with wrong type | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_conf_wrong_type.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][error][log] .ret_type() is expecting a valid php type ('false', 'true', 'array'. 'object', 'long', 'double', 'null', 'resource', 'reference', 'undef') on line 5 in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt b/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt new file mode 100644 index 0000000..a96b059 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_invalid_client_ip4.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Invalid client IP | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --ENV-- | ||
| 6 | return <<<EOF | ||
| 7 | REMOTE_ADDR=xyz | ||
| 8 | EOF; | ||
| 9 | --INI-- | ||
| 10 | sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | ||
| 11 | --FILE-- | ||
| 12 | <?php | ||
| 13 | strpos("1337", "1"); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | Fatal error: [snuffleupagus][xyz][cidr_match][log] Weird ip (xyz) family in %a/broken_invalid_client_ip4.php on line 2 \ No newline at end of file | ||
diff --git a/src/tests/broken_configuration_php8/broken_regexp.phpt b/src/tests/broken_configuration_php8/broken_regexp.phpt new file mode 100644 index 0000000..877f801 --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_regexp.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken regexp | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/broken_regexp.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to compile '^$[': missing terminating ] for character class on line 1. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] '.value_r()' is expecting a valid regexp, and not '"^$["' on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt b/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt new file mode 100644 index 0000000..d143cbd --- /dev/null +++ b/src/tests/broken_configuration_php8/broken_unmatching_brackets.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Broken configuration - unmatching brackets | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_unmatching_brackets.ini | ||
| 8 | --FILE-- | ||
| 9 | --EXPECTF-- | ||
| 10 | |||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid `]` position. in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid value 'arr[b]]]]]' for `param` on line 1 in Unknown on line 0 | ||
| 14 | |||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 16 | Could not startup. | ||
diff --git a/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini b/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini new file mode 100644 index 0000000..4e95294 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/borken_conf_enable_disable.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global_strict.disable().enable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini b/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini new file mode 100644 index 0000000..7c94185 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/borken_conf_upload_validation.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.upload_validation.script( | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf.ini b/src/tests/broken_configuration_php8/config/broken_conf.ini new file mode 100644 index 0000000..0595320 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf.ini | |||
| @@ -0,0 +1 @@ | |||
| this is a broken line | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf2.ini b/src/tests/broken_configuration_php8/config/broken_conf2.ini new file mode 100644 index 0000000..fdb6b8f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf2.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.wrong | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini new file mode 100644 index 0000000..5f07c28 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_action.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("my_cookie_name"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini new file mode 100644 index 0000000..a100bd8 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_encryption_key.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.cookie_env_var("MY_SUPER_ENV_VAR_YAY"); | ||
| 2 | sp.cookie.name("my_cookie_name").encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini new file mode 100644 index 0000000..54cb101 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_encryption_without_env_var.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.secret_key("super secret encryption key"); | ||
| 2 | sp.cookie.name("my_cookie_name").encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini new file mode 100644 index 0000000..503889b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_name_and_regexp.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("my_cookie_name").name_r("my_cookie_regexp").encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini b/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini new file mode 100644 index 0000000..acc4aa0 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_cookie_samesite.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("my_cookie_name").samesite("nop"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_eval.ini b/src/tests/broken_configuration_php8/config/broken_conf_eval.ini new file mode 100644 index 0000000..80ef7e5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_eval.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.eval_blacklist.list("cos,sin | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini b/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini new file mode 100644 index 0000000..51c28b2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_expecting_bool.ini | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # this is an example of broken conf | ||
| 2 | |||
| 3 | |||
| 4 | ; this is another comment | ||
| 5 | sp.harden_random.enable(1337); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini new file mode 100644 index 0000000..b1929c1 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("127.0.0.1/42"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini new file mode 100644 index 0000000..5e91faf --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329/ZZZ"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini new file mode 100644 index 0000000..067209f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_no_slash.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini new file mode 100644 index 0000000..f82b18b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr6_too_big.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr("2001:0db8:0000:0000:0000:ff00:0042:8329/13337"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini new file mode 100644 index 0000000..06a56bd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_cidr_value.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").drop().cidr(" | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini new file mode 100644 index 0000000..1be3b51 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_filename.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("sprintf").filename("wrong file name").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini new file mode 100644 index 0000000..9e7cea0 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_log_media.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.log_media("pouet"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini b/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini new file mode 100644 index 0000000..c52994e --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_invalid_type.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("strpos").ret_type("totally_wrong"_type") | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini b/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini new file mode 100644 index 0000000..a0edaf2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_key_value.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("").value("").key("").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini b/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini new file mode 100644 index 0000000..dfa5520 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_line_empty_string.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name( | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini b/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini new file mode 100644 index 0000000..6a8c922 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_line_no_closing.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("123" | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini new file mode 100644 index 0000000..ae5165c --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_1.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("]").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini new file mode 100644 index 0000000..93dd07f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_10.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd[asd]asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini new file mode 100644 index 0000000..028b1bd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_11.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("asd::").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini new file mode 100644 index 0000000..a151960 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_12.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini new file mode 100644 index 0000000..e7c9778 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_13.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd->asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini new file mode 100644 index 0000000..6c98ec3 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_14.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("$i+valid var name ").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini new file mode 100644 index 0000000..a8dc5a4 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_15.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("$i$$!@#->qwe").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini new file mode 100644 index 0000000..550719b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_16.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\"").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini new file mode 100644 index 0000000..145a3b5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_2.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\"\"asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini new file mode 100644 index 0000000..5d89076 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_3.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\$qwe->::").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini new file mode 100644 index 0000000..3ec073b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_4.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("\"asd\"asd[]").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini new file mode 100644 index 0000000..cd350b6 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_5.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("'asd'asd[]").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini new file mode 100644 index 0000000..02f4f1a --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_6.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("''asd").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini new file mode 100644 index 0000000..abbd223 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_7.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd-->").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini new file mode 100644 index 0000000..fd18487 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_8.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd[asd]\"asd\"").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini b/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini new file mode 100644 index 0000000..a311b86 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_local_var_9.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").var("asd[asd]\'asd\'").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini new file mode 100644 index 0000000..189a10d --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_lots_of_quotes.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("this\"is a weird\"\"\"cookie\"name""); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini b/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini new file mode 100644 index 0000000..a46f590 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_missing_script.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.upload_validation.enable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini new file mode 100644 index 0000000..7ea483f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").value_r("^id$").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini new file mode 100644 index 0000000..da8426e --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive10.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.readonly_exec.enable().disable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini new file mode 100644 index 0000000..cab163f --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive11.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("strcmp").drop().ret("hip").var("hop"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini new file mode 100644 index 0000000..fe140db --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive12.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("strcmp").drop().ret("hip").value("hop"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini new file mode 100644 index 0000000..3ff3ca7 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive2.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").function_r("system").param("id").value("42").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini new file mode 100644 index 0000000..f4f7604 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive3.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").filename_r("^id$").filename("pouet.txt").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini new file mode 100644 index 0000000..c38a727 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive4.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").param_r("^id$").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini new file mode 100644 index 0000000..254b2a3 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive5.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").ret("0").drop().ret_r("^0$"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini new file mode 100644 index 0000000..7c6712c --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive6.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").param("id").value("42").ret_r("^0$").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini new file mode 100644 index 0000000..feb3486 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive7.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("system").ret("0").drop().allow(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini new file mode 100644 index 0000000..c9c9ea2 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive8.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.ret("0").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini new file mode 100644 index 0000000..7bf6a62 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_mutually_exclusive9.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.unserialize_hmac.enable().disable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini b/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini new file mode 100644 index 0000000..8327438 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_nonexisting_script.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.upload_validation.enable().script("./non_existing_script.sh"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini new file mode 100644 index 0000000..eac8739 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_quotes.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.disable_function.function("system").filename("/static_pages/index.php").var("_SERVER[PHP_SELF").value_r("\"").drop().alias("XSS"); | ||
| 2 | sp.disable_function.filename("include/imageobject_im.class.php").function("exec").var("CONFIG[im_options]).value_r("[^a-z0-9]").drop(); | ||
| 3 | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini b/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini new file mode 100644 index 0000000..9e11313 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_readonly_exec.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.readonly_exec.enable(1234); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini new file mode 100644 index 0000000..66b7956 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.session.encrypt(invalid value :/); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini new file mode 100644 index 0000000..2b6f674 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_encryption_key.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.cookie_env_var("MY_SUPER_ENV_VAR_YAY"); | ||
| 2 | sp.session.encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini new file mode 100644 index 0000000..43caf4a --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_session_encryption_without_env_var.ini | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | sp.global.secret_key("super secret key, shhhh"); | ||
| 2 | sp.session.encrypt(); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini b/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini new file mode 100644 index 0000000..89e19be --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_to_few_args.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.harden_random.enable(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini b/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini new file mode 100644 index 0000000..9cdc9a6 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_unserialize.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.unserialize_hmac.enable(1234); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini b/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini new file mode 100644 index 0000000..bf5e7f5 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_weird_keyword.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.harden_random.enable().not_a_valid_keyword("test"); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini new file mode 100644 index 0000000..b8e08a8 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrapper_whitelist.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.wrappers_whitelist.invalid_param(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini new file mode 100644 index 0000000..ff41f93 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrong_quotes.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.cookie.name("\) | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini b/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini new file mode 100644 index 0000000..b2943db --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_conf_wrong_type.ini | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | sp.disable_function.function("strpos").ret_type("undef").drop().alias("Return value is undef"); | ||
| 2 | sp.disable_function.function("strpos").ret_type("null").drop().alias("Return value is null"); | ||
| 3 | sp.disable_function.function("strpos").ret_type("object").drop().alias("Return value is object"); | ||
| 4 | sp.disable_function.function("strpos").ret_type("reference").drop().alias("Return value is reference"); | ||
| 5 | sp.disable_function.function("strpos").ret_type("totally_wrong_type").drop().alias("Return value is FALSE"); | ||
diff --git a/src/tests/broken_configuration_php8/config/broken_config_regexp.ini b/src/tests/broken_configuration_php8/config/broken_config_regexp.ini new file mode 100644 index 0000000..62bed11 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_config_regexp.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function_r("^system$").filename_r("*.").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini b/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini new file mode 100644 index 0000000..93e150b --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_config_regexp_no_closing_paren.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function_r("^system$").drop().filename_r("*." | |||
diff --git a/src/tests/broken_configuration_php8/config/broken_regexp.ini b/src/tests/broken_configuration_php8/config/broken_regexp.ini new file mode 100644 index 0000000..8e4bf69 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/broken_regexp.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("AwesomeClass::method3").param("a").drop().value_r("^$["); | |||
diff --git a/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini b/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini new file mode 100644 index 0000000..bf05dfb --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_broken_conf_truncated.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("").param(no quote, omg! | |||
diff --git a/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini b/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini new file mode 100644 index 0000000..048e404 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_encrypted_cookies_noname.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("").encrypt(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
diff --git a/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini b/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini new file mode 100644 index 0000000..4fe92fd --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_encrypted_regexp_cookies_bad_regexp.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name_r("^super_co[a-z+$").encrypt(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
diff --git a/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini b/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini new file mode 100644 index 0000000..45fa4fe --- /dev/null +++ b/src/tests/broken_configuration_php8/config/config_unmatching_brackets.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("foo").param("arr[b]]]]]").value("aaa").alias("4").drop(); | |||
diff --git a/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini b/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini new file mode 100644 index 0000000..f69ce07 --- /dev/null +++ b/src/tests/broken_configuration_php8/config/disabled_functions_cidr.ini | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | sp.disable_function.function("system").drop().cidr("2001:ab9:a::123/64"); | ||
| 2 | sp.disable_function.function("system").drop().cidr("192.168.0.1/16"); | ||
| 3 | sp.disable_function.function("system").drop().cidr("127.0.0.1/8"); | ||
| 4 | sp.disable_function.function("printf").drop().cidr("10.0.0.1/8"); | ||
| 5 | sp.disable_function.function("strpos").drop().cidr("127.0.0.2/4"); | ||
| 6 | sp.disable_function.function("strpos").drop().cidr("::ffff:192.0.2.128/128"); | ||
| 7 | sp.disable_function.function("strpos").drop().cidr("2001:ab9:a::123/64"); | ||
| 8 | sp.disable_function.function("strpos").drop().cidr("2001:0db8:f000:f000:f000:ff00:0042:8329/124"); | ||
| 9 | sp.disable_function.function("printf").drop().cidr("2002:0db8:0000:0000:0000:ff00:0042:8329/24"); | ||
diff --git a/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt b/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt new file mode 100644 index 0000000..7a8c909 --- /dev/null +++ b/src/tests/broken_configuration_php8/encrypt_regexp_cookies_bad_regexp.phpt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | --TEST-- | ||
| 2 | Cookie decryption in ipv4 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_bad_regexp.ini | ||
| 7 | error_reporting=1 | ||
| 8 | --COOKIE-- | ||
| 9 | super_cookie=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3gV9YJZL/pUeNAjCKFW0U2ywmf1CwHzwd2pWM=;awful_cookie=awful_cookie_value; | ||
| 10 | --ENV-- | ||
| 11 | return <<<EOF | ||
| 12 | REMOTE_ADDR=127.0.0.1 | ||
| 13 | HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php var_dump($_COOKIE); ?> | ||
| 17 | --EXPECT-- | ||
| 18 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 | ||
| 19 | |||
| 20 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Failed to compile '^super_co[a-z+$': missing terminating ] for character class on line 2. in Unknown on line 0 | ||
| 21 | |||
| 22 | Fatal error: [snuffleupagus][127.0.0.1][config][log] '.name_r()' is expecting a valid regexp, and not '"^super_co[a-z+$"' on line 2 in Unknown on line 0 | ||
diff --git a/src/tests/config/phplog.ini b/src/tests/config/phplog.ini new file mode 100644 index 0000000..4eaa287 --- /dev/null +++ b/src/tests/config/phplog.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef"); | ||
| 2 | sp.unserialize_hmac.enable(); | ||
| 3 | sp.log_media("php"); | ||
diff --git a/src/tests/config/syslog.ini b/src/tests/config/syslog.ini new file mode 100644 index 0000000..17dce05 --- /dev/null +++ b/src/tests/config/syslog.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef"); | ||
| 2 | sp.unserialize_hmac.enable(); | ||
| 3 | sp.log_media("syslog"); | ||
diff --git a/src/tests/config/syslog_simulation.ini b/src/tests/config/syslog_simulation.ini new file mode 100644 index 0000000..bb52850 --- /dev/null +++ b/src/tests/config/syslog_simulation.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef"); | ||
| 2 | sp.unserialize_hmac.enable().simulation(); | ||
| 3 | sp.log_media("syslog"); | ||
diff --git a/src/tests/config_typo3.phpt b/src/tests/config_typo3.phpt index 1b678ca..6545d07 100644 --- a/src/tests/config_typo3.phpt +++ b/src/tests/config_typo3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Rules for Typo3 | 2 | Rules for Typo3 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/typo3.rules | 6 | sp.configuration_file={PWD}/../../config/typo3.rules |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies.phpt b/src/tests/cookies_encryption/encrypt_cookies.phpt index d581dbc..49587b7 100644 --- a/src/tests/cookies_encryption/encrypt_cookies.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption in ipv4 | 2 | Cookie decryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies2.phpt b/src/tests/cookies_encryption/encrypt_cookies2.phpt index 195cb24..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv4 | 2 | Cookie encryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies3.phpt b/src/tests/cookies_encryption/encrypt_cookies3.phpt index ceb364c..beb4efb 100644 --- a/src/tests/cookies_encryption/encrypt_cookies3.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption with ipv6 | 2 | Cookie decryption with ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies4.phpt b/src/tests/cookies_encryption/encrypt_cookies4.phpt index b644680..fa36756 100644 --- a/src/tests/cookies_encryption/encrypt_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies4.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv6 | 2 | Cookie encryption in ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 8 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt index 721806a..aeec708 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_empty_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - empty environment variable specified | 2 | Cookie encryption - empty environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_empty_env.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_empty_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -12,7 +12,7 @@ super_cookie=cGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3BhZGRpbmdwYWRkaW5ncGFkZGluZ3B | |||
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | <?php echo "1\n\n\n\n\n"; ?> | 13 | <?php echo "1\n\n\n\n\n"; ?> |
| 14 | --EXPECT-- | 14 | --EXPECT-- |
| 15 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 | 15 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption][log] The environment variable 'SUPER_ENV_VAR' is empty, cookies are weakly encrypted in Unknown on line 0 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | 17 | Warning: [snuffleupagus][0.0.0.0][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 |
| 18 | 1 | 18 | 1 |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt index e2190b3..cc988ce 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - invalid decryption | 2 | Cookie encryption - invalid decryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -18,7 +18,7 @@ EOF; | |||
| 18 | echo "1337\n"; | 18 | echo "1337\n"; |
| 19 | var_dump($_COOKIE); ?> | 19 | var_dump($_COOKIE); ?> |
| 20 | --EXPECT-- | 20 | --EXPECT-- |
| 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 |
| 22 | 1337 | 22 | 1337 |
| 23 | array(1) { | 23 | array(1) { |
| 24 | ["awfulcookie"]=> | 24 | ["awfulcookie"]=> |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt index 3efe051..5ec6af5 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,4 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt index f4afc32..a6afdbe 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt index 5c99dfc..00a2cec 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_short_cookie.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - invalid decryption in simulation mode with a short cookie | 2 | Cookie encryption - invalid decryption in simulation mode with a short cookie |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,7 +16,7 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 | 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Buffer underflow tentative detected in cookie encryption handling for super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 |
| 20 | array(2) { | 20 | array(2) { |
| 21 | ["super_cookie"]=> | 21 | ["super_cookie"]=> |
| 22 | string(3) "AAA" | 22 | string(3) "AAA" |
diff --git a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt index 29adcf4..4d8e18d 100644 --- a/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt +++ b/src/tests/cookies_encryption/encrypt_cookies_invalid_decryption_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - invalid decryption in simulation mode | 2 | Cookie encryption - invalid decryption in simulation mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies_simulation.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -18,7 +18,7 @@ EOF; | |||
| 18 | echo "1337\n"; | 18 | echo "1337\n"; |
| 19 | var_dump($_COOKIE); ?> | 19 | var_dump($_COOKIE); ?> |
| 20 | --EXPECT-- | 20 | --EXPECT-- |
| 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 | 21 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][simulation] Something went wrong with the decryption of super_cookie. Using the cookie 'as it' instead of decrypting it in Unknown on line 0 |
| 22 | 1337 | 22 | 1337 |
| 23 | array(2) { | 23 | array(2) { |
| 24 | ["super_cookie"]=> | 24 | ["super_cookie"]=> |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt index 6bc187a..da44855 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption in ipv4 | 2 | Cookie decryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt index 195cb24..18c6b41 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv4 | 2 | Cookie encryption in ipv4 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt index ceb364c..beb4efb 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie decryption with ipv6 | 2 | Cookie decryption with ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt index 14d737a..09184a8 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies4.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption in ipv6 | 2 | Cookie encryption in ipv6 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt index 7bd2fcc..53f2eba 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_empty_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - empty environment variable specified | 2 | Cookie encryption - empty environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_empty_env.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies_empty_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,4 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1\n\n\n\n\n"; ?> | 17 | <?php echo "1\n\n\n\n\n"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt index a0729d4..b101042 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,7 +16,7 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption] Something went wrong with the decryption of super_cookie in Unknown on line 0 | 19 | Warning: [snuffleupagus][127.0.0.1][cookie_encryption][log] Something went wrong with the decryption of super_cookie in Unknown on line 0 |
| 20 | array(1) { | 20 | array(1) { |
| 21 | ["awful_cookie"]=> | 21 | ["awful_cookie"]=> |
| 22 | string(18) "awful_cookie_value" | 22 | string(18) "awful_cookie_value" |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt index 11288e0..29444dc 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,4 +16,4 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php var_dump($_COOKIE); ?> | 17 | <?php var_dump($_COOKIE); ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt index 28ffaad..ea26b00 100644 --- a/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt +++ b/src/tests/cookies_encryption/encrypt_regexp_cookies_invalid_decryption3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption | 2 | Cookie encryption |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini | 6 | sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini |
| 7 | --COOKIE-- | 7 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption/setcookie.phpt b/src/tests/cookies_encryption/setcookie.phpt index ba1d1c1..4e86984 100644 --- a/src/tests/cookies_encryption/setcookie.phpt +++ b/src/tests/cookies_encryption/setcookie.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set cookies. | 2 | Set cookies. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini |
| 7 | --COOKIE-- | 8 | --COOKIE-- |
diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt index f1ebf2f..015c159 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no environment variable specified | 2 | Cookie encryption - no environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_env.ini | 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt index d24446b..42f5509 100644 --- a/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_cookies_no_key.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no encryption key specified | 2 | Cookie encryption - no encryption key specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_key.ini | 6 | sp.configuration_file={PWD}/config/encrypt_cookies_no_key.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt index 995ac4f..163cb26 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_env.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no environment variable specified | 2 | Cookie encryption - no environment variable specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_env.ini | 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_env.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.cookie_env_var` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt index ead651d..df31f2e 100644 --- a/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt +++ b/src/tests/cookies_encryption_warning/encrypt_regexp_cookies_no_key.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Cookie encryption - no encryption key specified | 2 | Cookie encryption - no encryption key specified |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_key.ini | 6 | sp.configuration_file={PWD}/config/encrypt_regexp_cookies_no_key.ini |
| 7 | display_errors=1 | 7 | display_errors=1 |
| @@ -16,6 +16,6 @@ EOF; | |||
| 16 | --FILE-- | 16 | --FILE-- |
| 17 | <?php echo "1"; ?> | 17 | <?php echo "1"; ?> |
| 18 | --EXPECT-- | 18 | --EXPECT-- |
| 19 | Fatal error: [snuffleupagus][127.0.0.1][config] Invalid configuration file in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][127.0.0.1][config][log] Invalid configuration file in Unknown on line 0 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][127.0.0.1][config] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][127.0.0.1][config][log] You're trying to use the cookie encryption featureon line 2 without having set the `.encryption_key` option in`sp.global`: please set it first in Unknown on line 0 |
diff --git a/src/tests/cookies_php8/config/config_encrypted_cookies.ini b/src/tests/cookies_php8/config/config_encrypted_cookies.ini new file mode 100644 index 0000000..4b50440 --- /dev/null +++ b/src/tests/cookies_php8/config/config_encrypted_cookies.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("super_cookie").encrypt(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
diff --git a/src/tests/cookies_php8/encrypt_cookies4.phpt b/src/tests/cookies_php8/encrypt_cookies4.phpt new file mode 100644 index 0000000..8b51838 --- /dev/null +++ b/src/tests/cookies_php8/encrypt_cookies4.phpt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | --TEST-- | ||
| 2 | Cookie encryption in ipv6 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | ||
| 8 | --COOKIE-- | ||
| 9 | --ENV-- | ||
| 10 | return <<<EOF | ||
| 11 | REMOTE_ADDR=2001:0db8:0000:0000:0000:fe00:0042:8329 | ||
| 12 | HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 | ||
| 13 | HTTPS=1 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php | ||
| 17 | setcookie("super_cookie", "super_value"); | ||
| 18 | setcookie("awful_cookie", "awful_value"); | ||
| 19 | setcookie("nice_cookie", "nice_value", 1, "1", "1", true, true); | ||
| 20 | $ret = setcookie("", "Cookie with no name", 1, "1", "1", true, true); | ||
| 21 | if ($ret == TRUE) { | ||
| 22 | echo "fail :/"; | ||
| 23 | } | ||
| 24 | var_dump($_COOKIE); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | ||
| 27 | Fatal error: Uncaught ValueError: setcookie(): Argument #1 ($name) cannot be empty in %s/tests/cookies_php8/encrypt_cookies4.php:5 | ||
| 28 | Stack trace: | ||
| 29 | #0 %s/tests/cookies_php8/encrypt_cookies4.php(5): setcookie('', 'Cookie with no ...', 1, '1', '1', true, true) | ||
| 30 | #1 {main} | ||
| 31 | thrown in %s/tests/cookies_php8/encrypt_cookies4.php on line 5 | ||
diff --git a/src/tests/cookies_php8/setcookie.phpt b/src/tests/cookies_php8/setcookie.phpt new file mode 100644 index 0000000..67f1f50 --- /dev/null +++ b/src/tests/cookies_php8/setcookie.phpt | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | --TEST-- | ||
| 2 | Set cookies. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_encrypted_cookies.ini | ||
| 8 | --COOKIE-- | ||
| 9 | --ENV-- | ||
| 10 | return <<<EOF | ||
| 11 | REMOTE_ADDR=127.0.0.1 | ||
| 12 | HTTP_USER_AGENT=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 | ||
| 13 | HTTPS=1 | ||
| 14 | EOF; | ||
| 15 | --FILE-- | ||
| 16 | <?php | ||
| 17 | setcookie("name"); | ||
| 18 | setcookie("super_cookie"); | ||
| 19 | setcookie("name", "value"); | ||
| 20 | setcookie("name", "value1", 1); | ||
| 21 | setcookie("name", "value2", 0); | ||
| 22 | setcookie("name", "value", 1, "/super/path"); | ||
| 23 | setcookie("name", "value", 1, "/super/path", "super_domain"); | ||
| 24 | setcookie("name", "value", 1, "/super/path", "super_domain1", true); | ||
| 25 | setcookie("name", "value", 1, "/super/path", "super_domain2", false); | ||
| 26 | setcookie("name", "value", 1, "/super/path", "super_domain1", true, true); | ||
| 27 | setcookie("name", "value", 1, "/super/path", "super_domain2", true, false); | ||
| 28 | setcookie("name", "value", 1, "/super/path", "super_domain2", true, false, 1337); | ||
| 29 | setcookie(); | ||
| 30 | echo '1337'; | ||
| 31 | ?> | ||
| 32 | --EXPECTF-- | ||
| 33 | Fatal error: Uncaught ArgumentCountError: setcookie() expects at most 7 arguments, 8 given in %s/tests/cookies_php8/setcookie.php:13 | ||
| 34 | Stack trace: | ||
| 35 | #0 %s/tests/cookies_php8/setcookie.php(13): setcookie('name', 'value', 1, '/super/path', 'super_domain2', true, false, 1337) | ||
| 36 | #1 {main} | ||
| 37 | thrown in %s/tests/cookies_php8/setcookie.php on line 13 | ||
diff --git a/src/tests/deny_writable/deny_writable_execution.phpt b/src/tests/deny_writable/deny_writable_execution.phpt index 43d12c3..e65dc32 100644 --- a/src/tests/deny_writable/deny_writable_execution.phpt +++ b/src/tests/deny_writable/deny_writable_execution.phpt | |||
| @@ -40,4 +40,4 @@ unlink("$dir/non_writable_file.txt"); | |||
| 40 | unlink("$dir/writable_file.txt"); | 40 | unlink("$dir/writable_file.txt"); |
| 41 | ?> | 41 | ?> |
| 42 | --EXPECTF-- | 42 | --EXPECTF-- |
| 43 | Fatal error: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 | 43 | Fatal error: [snuffleupagus][0.0.0.0][readonly_exec][drop] Attempted execution of a writable file (%a/deny_writable_execution.php). in %a/deny_writable_execution.php on line 2 |
diff --git a/src/tests/deny_writable/deny_writable_execution_simulation.phpt b/src/tests/deny_writable/deny_writable_execution_simulation.phpt index b03bc8f..30f8cb1 100644 --- a/src/tests/deny_writable/deny_writable_execution_simulation.phpt +++ b/src/tests/deny_writable/deny_writable_execution_simulation.phpt | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Readonly execution attempt (simulation mode) | 2 | Readonly execution attempt (simulation mode) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 4 | <?php | 5 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) print "skip"; | 6 | if (!extension_loaded("snuffleupagus")) { print "skip" }; |
| 6 | 7 | ||
| 7 | // root has write privileges on any file | 8 | // root has write privileges on any file |
| 8 | if (TRUE == function_exists("posix_getuid")) { | 9 | if (TRUE == function_exists("posix_getuid")) { |
| @@ -17,6 +18,7 @@ if (TRUE == function_exists("posix_getuid")) { | |||
| 17 | ?> | 18 | ?> |
| 18 | --INI-- | 19 | --INI-- |
| 19 | sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini | 20 | sp.configuration_file={PWD}/config/config_disable_writable_simulation.ini |
| 21 | --XFAIL-- | ||
| 20 | --FILE-- | 22 | --FILE-- |
| 21 | <?php | 23 | <?php |
| 22 | $dir = __DIR__; | 24 | $dir = __DIR__; |
| @@ -41,10 +43,10 @@ unlink("$dir/non_writable_file.txt"); | |||
| 41 | unlink("$dir/writable_file.txt"); | 43 | unlink("$dir/writable_file.txt"); |
| 42 | ?> | 44 | ?> |
| 43 | --EXPECTF-- | 45 | --EXPECTF-- |
| 44 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 | 46 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/deny_writable_execution_simulation.php). in %a/deny_writable_execution_simulation.php on line 2 |
| 45 | 47 | ||
| 46 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 | 48 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/deny_writable_execution_simulation.php on line 12 |
| 47 | 49 | ||
| 48 | Warning: [snuffleupagus][0.0.0.0][readonly_exec] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 | 50 | Warning: [snuffleupagus][0.0.0.0][readonly_exec][simulation] Attempted execution of a writable file (%a/writable_file.txt). in %a/writable_file.txt on line 1 |
| 49 | Code execution within a writable file. | 51 | Code execution within a writable file. |
| 50 | Code execution within a non-writable file. | 52 | Code execution within a non-writable file. |
diff --git a/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini new file mode 100644 index 0000000..4d2f68d --- /dev/null +++ b/src/tests/disable_function/config/config_disabled_functions_chain_call_skip.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.disable_function.function("a>c").simulation().drop(); | |||
diff --git a/src/tests/disable_function/config/config_disabled_functions_param_array.ini b/src/tests/disable_function/config/config_disabled_functions_param_array.ini index f676d76..2bfa648 100644 --- a/src/tests/disable_function/config/config_disabled_functions_param_array.ini +++ b/src/tests/disable_function/config/config_disabled_functions_param_array.ini | |||
| @@ -4,4 +4,3 @@ sp.disable_function.function("foo").param("arr[test]").alias("3").drop(); | |||
| 4 | sp.disable_function.function("foo").param("arr[test2][foo]").value("aaa").alias("4").drop(); | 4 | sp.disable_function.function("foo").param("arr[test2][foo]").value("aaa").alias("4").drop(); |
| 5 | sp.disable_function.function("foo").param("arr[test2][bar]").key("lol").alias("5").drop(); | 5 | sp.disable_function.function("foo").param("arr[test2][bar]").key("lol").alias("5").drop(); |
| 6 | sp.disable_function.function("foo").param("arr[test2][bar]").key("123").alias("6").drop(); | 6 | sp.disable_function.function("foo").param("arr[test2][bar]").key("123").alias("6").drop(); |
| 7 | sp.disable_function.function("foo").param("qwe[a]").value("abcd").alias("7").drop(); | ||
diff --git a/src/tests/disable_function/disabled_function_echo.phpt b/src/tests/disable_function/disabled_function_echo.phpt index 5dbfe43..12aaff4 100644 --- a/src/tests/disable_function/disabled_function_echo.phpt +++ b/src/tests/disable_function/disabled_function_echo.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,4 +16,4 @@ test("oops"); | |||
| 16 | --CLEAN-- | 16 | --CLEAN-- |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | qwerty | 18 | qwerty |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_echo_2.phpt b/src/tests/disable_function/disabled_function_echo_2.phpt index c317cf7..82a2fa1 100644 --- a/src/tests/disable_function/disabled_function_echo_2.phpt +++ b/src/tests/disable_function/disabled_function_echo_2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ echo "1", "oops"; | |||
| 12 | --CLEAN-- | 12 | --CLEAN-- |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | qwe1 | 14 | qwe1 |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_2.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_echo_local_var.phpt b/src/tests/disable_function/disabled_function_echo_local_var.phpt index 3bbb2a0..ee1be1f 100644 --- a/src/tests/disable_function/disabled_function_echo_local_var.phpt +++ b/src/tests/disable_function/disabled_function_echo_local_var.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_echo.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ test(); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | 3 | 19 | 3 |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_echo_local_var.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index dc53593..9872374 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that client certificates validation can't be disabled | 2 | Disable functions - Ensure that client certificates validation can't be disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -17,4 +17,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, '0'); | |||
| 17 | echo "1337"; | 17 | echo "1337"; |
| 18 | ?> | 18 | ?> |
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs.php on line %d | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index 9ff37ec..45ae95e 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_multi_setopt` | 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_multi_setopt` |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -16,4 +16,4 @@ curl_multi_setopt($mch, CURLOPT_SSL_VERIFYPEER, 0); | |||
| 16 | echo "1337"; | 16 | echo "1337"; |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_multi_setopt.php on line %d | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (64) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_multi_setopt.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index 246fee6..93ed020 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_setopt_array` | 2 | Disable functions - Ensure that client certificates validation can't be disabled via `curl_setopt_array` |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -18,4 +18,4 @@ curl_setopt_array($ch, $options); | |||
| 18 | echo "1337"; | 18 | echo "1337"; |
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_setopt_array.php on line 5 | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYPEER off.' in %s/disabled_function_ensure_client_valid_certs_curl_setopt_array.php on line 5 |
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index fa583b0..6e027de 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that server certificates validation can't be disabled | 2 | Disable functions - Ensure that server certificates validation can't be disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -17,4 +17,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0'); | |||
| 17 | echo "1337"; | 17 | echo "1337"; |
| 18 | ?> | 18 | ?> |
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 3b374ee..32013b5 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | Disable functions - Ensure that server certificates validation can't be disabled via `curl_multi_setopt` | 2 | Disable functions - Ensure that server certificates validation can't be disabled via `curl_multi_setopt` |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { die("skip"); } | 5 | if (!extension_loaded("snuffleupagus")) { print("skip"); } |
| 6 | if (!extension_loaded("curl")) { die("skip"); } | 6 | if (!extension_loaded("curl")) { print("skip"); } |
| 7 | ?> | 7 | ?> |
| 8 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
| 9 | curl | 9 | curl |
| @@ -16,4 +16,4 @@ curl_multi_setopt($mch, CURLOPT_SSL_VERIFYHOST, 0); | |||
| 16 | echo "1337"; | 16 | echo "1337"; |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_multi_setopt.php on line %d | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_multi_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_multi_setopt.php on line %d |
diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt index 97accce..ec0528a 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt | |||
| @@ -18,4 +18,4 @@ curl_setopt_array($ch, $options); | |||
| 18 | echo "1337"; | 18 | echo "1337"; |
| 19 | ?> | 19 | ?> |
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_setopt_array.php on line 5 | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'curl_setopt_array', because its argument '$options' content (0) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs_curl_setopt_array.php on line 5 |
diff --git a/src/tests/disable_function/disabled_function_local_var.phpt b/src/tests/disable_function/disabled_function_local_var.phpt index 1323cc9..c28fd8c 100644 --- a/src/tests/disable_function/disabled_function_local_var.phpt +++ b/src/tests/disable_function/disabled_function_local_var.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,4 +22,4 @@ Value of a: 1338 | |||
| 22 | ID | 22 | ID |
| 23 | Value of a: 1337 | 23 | Value of a: 1337 |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 | 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_10.phpt b/src/tests/disable_function/disabled_function_local_var_10.phpt index a3110ac..2d5478d 100644 --- a/src/tests/disable_function/disabled_function_local_var_10.phpt +++ b/src/tests/disable_function/disabled_function_local_var_10.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -42,4 +42,4 @@ array(2) { | |||
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 \ No newline at end of file | 45 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_10.php on line 7 |
diff --git a/src/tests/disable_function/disabled_function_local_var_2.phpt b/src/tests/disable_function/disabled_function_local_var_2.phpt index d672010..076c3c5 100644 --- a/src/tests/disable_function/disabled_function_local_var_2.phpt +++ b/src/tests/disable_function/disabled_function_local_var_2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -44,4 +44,4 @@ array(2) { | |||
| 44 | string(5) "block" | 44 | string(5) "block" |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 | 47 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_2.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_3.phpt b/src/tests/disable_function/disabled_function_local_var_3.phpt index 66c5d69..f404682 100644 --- a/src/tests/disable_function/disabled_function_local_var_3.phpt +++ b/src/tests/disable_function/disabled_function_local_var_3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -43,4 +43,4 @@ array(2) { | |||
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 | 46 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_3.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_local_var_4.phpt b/src/tests/disable_function/disabled_function_local_var_4.phpt index fceee23..ec44c3f 100644 --- a/src/tests/disable_function/disabled_function_local_var_4.phpt +++ b/src/tests/disable_function/disabled_function_local_var_4.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_2.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -54,4 +54,4 @@ test(); | |||
| 54 | Valeur: valeur de a | 54 | Valeur: valeur de a |
| 55 | Valeur: valeur de apres | 55 | Valeur: valeur de apres |
| 56 | 56 | ||
| 57 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 \ No newline at end of file | 57 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_4.php on line 36 |
diff --git a/src/tests/disable_function/disabled_function_local_var_5.phpt b/src/tests/disable_function/disabled_function_local_var_5.phpt index e95ff19..7e592cd 100644 --- a/src/tests/disable_function/disabled_function_local_var_5.phpt +++ b/src/tests/disable_function/disabled_function_local_var_5.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -31,4 +31,4 @@ object(stdClass)#1 (1) { | |||
| 31 | string(16) "not a good value" | 31 | string(16) "not a good value" |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 | 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_5.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_local_var_6.phpt b/src/tests/disable_function/disabled_function_local_var_6.phpt index cd2eb61..a4d9ae9 100644 --- a/src/tests/disable_function/disabled_function_local_var_6.phpt +++ b/src/tests/disable_function/disabled_function_local_var_6.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -29,4 +29,4 @@ class test_object { | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: no good | 30 | Valeur: no good |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 \ No newline at end of file | 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_6.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_7.phpt b/src/tests/disable_function/disabled_function_local_var_7.phpt index d219780..f6d4dc6 100644 --- a/src/tests/disable_function/disabled_function_local_var_7.phpt +++ b/src/tests/disable_function/disabled_function_local_var_7.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -29,4 +29,4 @@ class test_object { | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Valeur: qwerty | 30 | Valeur: qwerty |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 \ No newline at end of file | 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_7.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_8.phpt b/src/tests/disable_function/disabled_function_local_var_8.phpt index 8b64534..1279269 100644 --- a/src/tests/disable_function/disabled_function_local_var_8.phpt +++ b/src/tests/disable_function/disabled_function_local_var_8.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ namespace asd { | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: qwerty | 19 | Valeur: qwerty |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_8.php on line 8 |
diff --git a/src/tests/disable_function/disabled_function_local_var_9.phpt b/src/tests/disable_function/disabled_function_local_var_9.phpt index cc37a78..7e56a67 100644 --- a/src/tests/disable_function/disabled_function_local_var_9.phpt +++ b/src/tests/disable_function/disabled_function_local_var_9.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ namespace asd { | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Valeur: asdfgh | 19 | Valeur: asdfgh |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_9.php on line 8 |
diff --git a/src/tests/disable_function/disabled_function_local_var_const.phpt b/src/tests/disable_function/disabled_function_local_var_const.phpt index 1500558..e349b8e 100644 --- a/src/tests/disable_function/disabled_function_local_var_const.phpt +++ b/src/tests/disable_function/disabled_function_local_var_const.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a constant | 2 | Disable functions - match on a constant |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_const.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ define("MY_CONST", $a); | |||
| 11 | strtoupper("test"); | 11 | strtoupper("test"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_const.php on line 4 |
diff --git a/src/tests/disable_function/disabled_function_local_var_crash.phpt b/src/tests/disable_function/disabled_function_local_var_crash.phpt index 3381b6c..f36b2c7 100644 --- a/src/tests/disable_function/disabled_function_local_var_crash.phpt +++ b/src/tests/disable_function/disabled_function_local_var_crash.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_function_local_var_obj.phpt b/src/tests/disable_function/disabled_function_local_var_obj.phpt index c8c3be3..684933a 100644 --- a/src/tests/disable_function/disabled_function_local_var_obj.phpt +++ b/src/tests/disable_function/disabled_function_local_var_obj.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a local variable | 2 | Disable functions - match on a local variable |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_obj.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -23,4 +23,4 @@ echo strtoupper($test->$arg) . "\n"; | |||
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | QWE | 24 | QWE |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 | 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_local_var_obj.php on line 14 |
diff --git a/src/tests/disable_function/disabled_function_param.phpt b/src/tests/disable_function/disabled_function_param.phpt index 80812b9..e318a15 100644 --- a/src/tests/disable_function/disabled_function_param.phpt +++ b/src/tests/disable_function/disabled_function_param.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a param | 2 | Disable functions - match on a param |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_param.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_param.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -17,4 +17,4 @@ qweqwe(Array(2)); | |||
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | OK | 18 | OK |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 \ No newline at end of file | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'qweqwe', because its argument '$asd' content (2) matched a rule in %a/disabled_function_param.php on line 3 |
diff --git a/src/tests/disable_function/disabled_function_print.phpt b/src/tests/disable_function/disabled_function_print.phpt index ee02687..ec1b04f 100644 --- a/src/tests/disable_function/disabled_function_print.phpt +++ b/src/tests/disable_function/disabled_function_print.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Echo hooking | 2 | Echo hooking |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_print.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_print.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,4 +16,4 @@ test("oops"); | |||
| 16 | --CLEAN-- | 16 | --CLEAN-- |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | qwerty | 18 | qwerty |
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'echo' in %a/disabled_function_print.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_function_super_global_var.phpt b/src/tests/disable_function/disabled_function_super_global_var.phpt index 19bb892..6232e19 100644 --- a/src/tests/disable_function/disabled_function_super_global_var.phpt +++ b/src/tests/disable_function/disabled_function_super_global_var.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a super global | 2 | Disable functions - match on a super global |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_super_global_var.ini |
| 7 | --GET-- | 7 | --GET-- |
| @@ -22,4 +22,4 @@ test(); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | TEST | 23 | TEST |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4 | 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_function_super_global_var.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions.phpt b/src/tests/disable_function/disabled_functions.phpt index 45a46ad..cda7c20 100644 --- a/src/tests/disable_function/disabled_functions.phpt +++ b/src/tests/disable_function/disabled_functions.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ var_dump("this is a super test"); | |||
| 14 | echo strpos("pouet", "o"); | 14 | echo strpos("pouet", "o"); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line %d | 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt index 63a0e00..ec75d74 100644 --- a/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_callback_called_file_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching on the filename_r where the callback function is called, and not defined | 2 | Disable functions by matching on the filename_r where the callback function is called, and not defined |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_callback_called_file_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -36,4 +36,4 @@ $dir = __DIR__; | |||
| 36 | @unlink("$dir/myfunc_callback.php"); | 36 | @unlink("$dir/myfunc_callback.php"); |
| 37 | ?> | 37 | ?> |
| 38 | --EXPECTF-- | 38 | --EXPECTF-- |
| 39 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 | 39 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test_callback' in %a/myfunc_callback.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions_called_file_r.phpt b/src/tests/disable_function/disabled_functions_called_file_r.phpt index a02dde0..dde26f7 100644 --- a/src/tests/disable_function/disabled_functions_called_file_r.phpt +++ b/src/tests/disable_function/disabled_functions_called_file_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching on the filename_r where the function is called, and not defined | 2 | Disable functions by matching on the filename_r where the function is called, and not defined |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_called_file_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -31,4 +31,4 @@ $dir = __DIR__; | |||
| 31 | @unlink("$dir/myfunc.php"); | 31 | @unlink("$dir/myfunc.php"); |
| 32 | ?> | 32 | ?> |
| 33 | --EXPECTF-- | 33 | --EXPECTF-- |
| 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 | 34 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test' in %a/myfunc.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_chain.phpt b/src/tests/disable_function/disabled_functions_chain.phpt index fd379c9..7edf863 100644 --- a/src/tests/disable_function/disabled_functions_chain.phpt +++ b/src/tests/disable_function/disabled_functions_chain.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace | 2 | Disable functions by matching the calltrace |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -24,4 +24,4 @@ echo "I'm after the call to outer\n"; | |||
| 24 | I'm before the call to outer | 24 | I'm before the call to outer |
| 25 | I'm in the outer function, before the call! | 25 | I'm in the outer function, before the call! |
| 26 | 26 | ||
| 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file | 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_chain_call_skip.phpt b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt new file mode 100644 index 0000000..267b691 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_chain_call_skip.phpt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions by matching the calltrace, with a superfluous function in between | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_skip.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | |||
| 10 | function a() { | ||
| 11 | echo "I'm in the `a` function!\n"; | ||
| 12 | b(); | ||
| 13 | } | ||
| 14 | function b() { | ||
| 15 | echo "I'm in the `b` function!\n"; | ||
| 16 | c(); | ||
| 17 | } | ||
| 18 | function c() { | ||
| 19 | echo "I'm in the `c` function!\n"; | ||
| 20 | } | ||
| 21 | |||
| 22 | a(); | ||
| 23 | ?> | ||
| 24 | --EXPECTF-- | ||
| 25 | I'm in the `a` function! | ||
| 26 | I'm in the `b` function! | ||
| 27 | |||
| 28 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a>c' in %s/tests/disable_function/disabled_functions_chain_call_skip.php on line 12 | ||
| 29 | I'm in the `c` function! | ||
diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt index fd07225..c7a1f88 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace, with call_user_func involved | 2 | Disable functions by matching the calltrace, with call_user_func involved |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -24,4 +24,4 @@ echo "I'm after the call to outer\n"; | |||
| 24 | I'm before the call to outer | 24 | I'm before the call to outer |
| 25 | I'm in the outer function, before the call! | 25 | I'm in the outer function, before the call! |
| 26 | 26 | ||
| 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file | 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt index 3046096..1a77205 100644 --- a/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt +++ b/src/tests/disable_function/disabled_functions_chain_call_user_func_ret.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace, on the return value | 2 | Disable functions by matching the calltrace, on the return value |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain_call_user_func_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -28,7 +28,7 @@ not matching_one | |||
| 28 | one | 28 | one |
| 29 | two | 29 | two |
| 30 | 30 | ||
| 31 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'two', because the function returned 'matching_two', which matched a rule in %a/disabled_functions_chain_call_user_func_ret.php on line %d | 31 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'two', because the function returned 'matching_two', which matched a rule in %a/disabled_functions_chain_call_user_func_ret.php on line %d |
| 32 | matching_one | 32 | matching_one |
| 33 | one | 33 | one |
| 34 | two | 34 | two |
diff --git a/src/tests/disable_function/disabled_functions_chain_not_matching.phpt b/src/tests/disable_function/disabled_functions_chain_not_matching.phpt index 3a0400a..91b4154 100644 --- a/src/tests/disable_function/disabled_functions_chain_not_matching.phpt +++ b/src/tests/disable_function/disabled_functions_chain_not_matching.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions by matching the calltrace | 2 | Disable functions by matching the calltrace |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_chain.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_cidr.phpt b/src/tests/disable_function/disabled_functions_cidr.phpt index ea690e8..ef82957 100644 --- a/src/tests/disable_function/disabled_functions_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_cidr.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=127.0.0.1 | 7 | REMOTE_ADDR=127.0.0.1 |
| @@ -13,4 +13,4 @@ sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | |||
| 13 | system("echo 42"); | 13 | system("echo 42"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_cidr_6.phpt b/src/tests/disable_function/disabled_functions_cidr_6.phpt index 914cd35..0153cc5 100644 --- a/src/tests/disable_function/disabled_functions_cidr_6.phpt +++ b/src/tests/disable_function/disabled_functions_cidr_6.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=2001:0db8:f000:f000:f000:ff00:0042:8328 | 7 | REMOTE_ADDR=2001:0db8:f000:f000:f000:ff00:0042:8328 |
| @@ -14,4 +14,4 @@ strpos("a", "b"); | |||
| 14 | printf(1337); | 14 | printf(1337); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][2001:0db8:f000:f000:f000:ff00:0042:8328][disabled_function] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 | 17 | Fatal error: [snuffleupagus][2001:0db8:f000:f000:f000:ff00:0042:8328][disabled_function][drop] Aborted execution on call of the function 'strpos' in %a/disabled_functions_cidr_6.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt new file mode 100644 index 0000000..85aeb1a --- /dev/null +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - CIDR match on an x-forwarded-for | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --ENV-- | ||
| 6 | return <<<EOF | ||
| 7 | HTTP_X_FORWARDED_FOR=127.0.0.1 | ||
| 8 | EOF; | ||
| 9 | --INI-- | ||
| 10 | sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | ||
| 11 | --FILE-- | ||
| 12 | <?php | ||
| 13 | system("echo 42"); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for.php on line 2 | ||
diff --git a/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt new file mode 100644 index 0000000..af5c6ed --- /dev/null +++ b/src/tests/disable_function/disabled_functions_cidr_x_fwd_for_remote_addr.phpt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - x-forwarded-for and remote-addr | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --ENV-- | ||
| 6 | return <<<EOF | ||
| 7 | HTTP_X_FORWARDED_FOR=127.0.0.1 | ||
| 8 | REMOTE_ADDR=127.0.0.2 | ||
| 9 | EOF; | ||
| 10 | --INI-- | ||
| 11 | sp.configuration_file={PWD}/config/disabled_functions_cidr.ini | ||
| 12 | --FILE-- | ||
| 13 | <?php | ||
| 14 | system("echo 42"); | ||
| 15 | ?> | ||
| 16 | --EXPECTF-- | ||
| 17 | Fatal error: [snuffleupagus][127.0.0.2][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_cidr_x_fwd_for_remote_addr.php on line 2 | ||
diff --git a/src/tests/disable_function/disabled_functions_die.phpt b/src/tests/disable_function/disabled_functions_die.phpt index 73bd657..75c8e1b 100644 --- a/src/tests/disable_function/disabled_functions_die.phpt +++ b/src/tests/disable_function/disabled_functions_die.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - die | 2 | Disable functions - die |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_die.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_die.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ die('OMG'); | |||
| 10 | ?> | 10 | ?> |
| 11 | --XFAIL-- | 11 | --XFAIL-- |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'die' in %a/disabled_function_echo.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_drop_include.phpt b/src/tests/disable_function/disabled_functions_drop_include.phpt index ba1c955..975168e 100644 --- a/src/tests/disable_function/disabled_functions_drop_include.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 | 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt index 1b13915..0a693be 100644 --- a/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_drop_include_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 | 2 | Disable function, bug : https://github.com/jvoisin/snuffleupagus/issues/181 |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_drop_include_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_eval.phpt b/src/tests/disable_function/disabled_functions_eval.phpt index 04b2342..78156e1 100644 --- a/src/tests/disable_function/disabled_functions_eval.phpt +++ b/src/tests/disable_function/disabled_functions_eval.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval | 2 | Disable functions - eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_eval.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_eval.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval.php(3) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_eval_filename.phpt b/src/tests/disable_function/disabled_functions_eval_filename.phpt index 564116e..8ee482d 100644 --- a/src/tests/disable_function/disabled_functions_eval_filename.phpt +++ b/src/tests/disable_function/disabled_functions_eval_filename.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval | 2 | Disable functions - eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_filename.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_filename.php(3) : eval()'d code on line 1 |
diff --git a/src/tests/disable_function/disabled_functions_eval_simulation.phpt b/src/tests/disable_function/disabled_functions_eval_simulation.phpt index 6286235..9e36006 100644 --- a/src/tests/disable_function/disabled_functions_eval_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_eval_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval (simulation) | 2 | Disable functions - eval (simulation) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_eval_simulation.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_eval_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,5 +11,5 @@ eval('$var = 1337 + 1337;'); | |||
| 11 | print("Variable: $var\n"); | 11 | print("Variable: $var\n"); |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 | 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'eval' in %a/disabled_functions_eval_simulation.php(3) : eval()'d code on line 1 |
| 15 | Variable: 2674 \ No newline at end of file | 15 | Variable: 2674 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_eval_user.phpt b/src/tests/disable_function/disabled_functions_eval_user.phpt index 7e02d13..84643f6 100644 --- a/src/tests/disable_function/disabled_functions_eval_user.phpt +++ b/src/tests/disable_function/disabled_functions_eval_user.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - eval with a disabled user func | 2 | Disable functions - eval with a disabled user func |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_user_func.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_eval_user_func.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -15,4 +15,4 @@ eval('$a = my_func();'); | |||
| 15 | echo '$a = ' . $a . "\n"; | 15 | echo '$a = ' . $a . "\n"; |
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_func' in %a/disabled_functions_eval_user.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_exit.phpt b/src/tests/disable_function/disabled_functions_exit.phpt index a6fd3c6..2aa013b 100644 --- a/src/tests/disable_function/disabled_functions_exit.phpt +++ b/src/tests/disable_function/disabled_functions_exit.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - exit | 2 | Disable functions - exit |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_exit.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_exit.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ exit('OMG'); | |||
| 10 | ?> | 10 | ?> |
| 11 | --XFAIL-- | 11 | --XFAIL-- |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'exit' in %a/disabled_function_echo.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_filename_r.phpt b/src/tests/disable_function/disabled_functions_filename_r.phpt index 9f36cce..97e703b 100644 --- a/src/tests/disable_function/disabled_functions_filename_r.phpt +++ b/src/tests/disable_function/disabled_functions_filename_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - filename regexp | 2 | Disable functions - filename regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_filename_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ shell_exec("echo 43"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 42 | 13 | 42 |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'shell_exec' in %a/disabled_functions_filename_r.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_include_once.phpt b/src/tests/disable_function/disabled_functions_include_once.phpt index 3709aff..57cb5a1 100644 --- a/src/tests/disable_function/disabled_functions_include_once.phpt +++ b/src/tests/disable_function/disabled_functions_include_once.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - include_once | 2 | Disable functions - include_once |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | 24 | ||
| 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 | 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include_once', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_once.php on line 6 |
| 26 | MEH | 26 | MEH |
| 27 | 1337 | 27 | 1337 |
diff --git a/src/tests/disable_function/disabled_functions_include_simulation.phpt b/src/tests/disable_function/disabled_functions_include_simulation.phpt index 60ba9ee..53ea2a4 100644 --- a/src/tests/disable_function/disabled_functions_include_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_include_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Include (simulation) | 2 | Disable functions - Include (simulation) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_include.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | 24 | ||
| 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 | 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'include', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_include_simulation.php on line 6 |
| 26 | MEH | 26 | MEH |
| 27 | 1337 | 27 | 1337 |
diff --git a/src/tests/disable_function/disabled_functions_local_var_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array.phpt index f460d72..bff34eb 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt index b69db4a..bb66ac0 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_key.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_key.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_local_var_array_key.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_local_var_array_key.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt index 54e8719..6a62074 100644 --- a/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt +++ b/src/tests/disable_function/disabled_functions_local_var_array_not_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini | 6 | sp.configuration_file={PWD}/config/disabled_function_local_var_array_not_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_mb.phpt b/src/tests/disable_function/disabled_functions_mb.phpt index eda11f7..3640679 100644 --- a/src/tests/disable_function/disabled_functions_mb.phpt +++ b/src/tests/disable_function/disabled_functions_mb.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_mb.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_mb.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_mb.ini | |||
| 9 | echo strtoupper("id"); | 9 | echo strtoupper("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_mb.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_method.phpt b/src/tests/disable_function/disabled_functions_method.phpt index 632d570..b37f9fd 100644 --- a/src/tests/disable_function/disabled_functions_method.phpt +++ b/src/tests/disable_function/disabled_functions_method.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_method.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_method.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -24,4 +24,4 @@ $c->method2("paf"); | |||
| 24 | $c->method3("pouet"); | 24 | $c->method3("pouet"); |
| 25 | ?> | 25 | ?> |
| 26 | --EXPECTF-- | 26 | --EXPECTF-- |
| 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 \ No newline at end of file | 27 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions_name_r.phpt b/src/tests/disable_function/disabled_functions_name_r.phpt index 0a151a6..7a45c6e 100644 --- a/src/tests/disable_function/disabled_functions_name_r.phpt +++ b/src/tests/disable_function/disabled_functions_name_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ system("echo 1337"); | |||
| 13 | 42 | 13 | 42 |
| 14 | 1337 | 14 | 1337 |
| 15 | 15 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_name_r.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt index 0bcb28c..25ac2b3 100644 --- a/src/tests/disable_function/disabled_functions_name_regexp_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_regexp_type.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_regexp_type.ini | 7 | sp.configuration_file={PWD}/config/config_disabled_functions_name_regexp_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -14,4 +15,4 @@ echo strcmp([1], "pouet") . "\n"; | |||
| 14 | 0 | 15 | 0 |
| 15 | -1 | 16 | -1 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument 'str1' content (?) matched a rule in %a/disabled_functions_name_regexp_type.php on line 4 |
diff --git a/src/tests/disable_function/disabled_functions_name_type.phpt b/src/tests/disable_function/disabled_functions_name_type.phpt index 59b4683..8d70eaa 100644 --- a/src/tests/disable_function/disabled_functions_name_type.phpt +++ b/src/tests/disable_function/disabled_functions_name_type.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_name_type.ini | 7 | sp.configuration_file={PWD}/config/config_disabled_functions_name_type.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -12,4 +13,4 @@ echo strcmp([1,23], "pouet") . "\n"; | |||
| 12 | --EXPECTF-- | 13 | --EXPECTF-- |
| 13 | 0 | 14 | 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp', because its argument '$str1' content (ARRAY) matched a rule in %a/disabled_functions_name_type.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_namespace.phpt b/src/tests/disable_function/disabled_functions_namespace.phpt index af310c3..c169487 100644 --- a/src/tests/disable_function/disabled_functions_namespace.phpt +++ b/src/tests/disable_function/disabled_functions_namespace.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions in namespaces | 2 | Disable functions in namespaces |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_namespace.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_namespace.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -27,4 +27,4 @@ my_function(); | |||
| 27 | } | 27 | } |
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file | 30 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_namespace.php on line 16 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_noconf.phpt b/src/tests/disable_function/disabled_functions_noconf.phpt index cb13413..8e2306a 100644 --- a/src/tests/disable_function/disabled_functions_noconf.phpt +++ b/src/tests/disable_function/disabled_functions_noconf.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/empty.ini | 6 | sp.configuration_file={PWD}/config/empty.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_nul_byte.phpt b/src/tests/disable_function/disabled_functions_nul_byte.phpt index dbb7600..62f4ab5 100644 --- a/src/tests/disable_function/disabled_functions_nul_byte.phpt +++ b/src/tests/disable_function/disabled_functions_nul_byte.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions with nul byte | 2 | Disable functions with nul byte |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_nul_byte.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ system("id"); | |||
| 11 | 11 | ||
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (0id) matched a rule in %a/disabled_functions_nul_byte.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_param.phpt b/src/tests/disable_function/disabled_functions_param.phpt index 4bc276a..0a9e8eb 100644 --- a/src/tests/disable_function/disabled_functions_param.phpt +++ b/src/tests/disable_function/disabled_functions_param.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -15,4 +15,4 @@ strcmp("bla", "ble"); | |||
| 15 | strncmp("bla", "ble", 2); | 15 | strncmp("bla", "ble", 2); |
| 16 | ?> | 16 | ?> |
| 17 | --EXPECTF-- | 17 | --EXPECTF-- |
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument '$command' content (id) matched the rule '1' in %a/disabled_functions_param.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_param_alias.phpt b/src/tests/disable_function/disabled_functions_param_alias.phpt index 1d44e72..334570b 100644 --- a/src/tests/disable_function/disabled_functions_param_alias.phpt +++ b/src/tests/disable_function/disabled_functions_param_alias.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - alias | 2 | Disable functions - alias |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_alias.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_alias.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ system("id"); | |||
| 10 | shell_exec("id"); | 10 | shell_exec("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because of the the rule '1' in %a/disabled_functions_param_alias.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_allow.phpt b/src/tests/disable_function/disabled_functions_param_allow.phpt index b0e7de1..3555d19 100644 --- a/src/tests/disable_function/disabled_functions_param_allow.phpt +++ b/src/tests/disable_function/disabled_functions_param_allow.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - allow | 2 | Disable functions - allow |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_allow.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ system("id"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | win | 13 | win |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_allow.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array.phpt b/src/tests/disable_function/disabled_functions_param_array.phpt index 2053b14..c8bca3a 100644 --- a/src/tests/disable_function/disabled_functions_param_array.phpt +++ b/src/tests/disable_function/disabled_functions_param_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,4 +22,4 @@ foo($a); | |||
| 22 | test1 | 22 | test1 |
| 23 | abcde | 23 | abcde |
| 24 | 24 | ||
| 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 \ No newline at end of file | 25 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcd) matched the rule '1' in %a/disabled_functions_param_array.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt index f162d47..e2efc79 100644 --- a/src/tests/disable_function/disabled_functions_param_array_deref.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -23,4 +23,4 @@ foo($a); | |||
| 23 | eee | 23 | eee |
| 24 | abcdef | 24 | abcdef |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file | 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt index 549842f..c857aa0 100644 --- a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - matching on an array's variable only | 2 | Disable functions - matching on an array's variable only |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -20,4 +20,4 @@ foo($a); | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | cccc | 21 | cccc |
| 22 | 22 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file | 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_r.phpt b/src/tests/disable_function/disabled_functions_param_array_r.phpt index 6c11c63..69f729f 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array using regexp | 2 | Disable functions - match on an array using regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '1' in %a/disabled_functions_param_array_r.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt index 3fdd398..e4912df 100644 --- a/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_r_keys.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array using regexp | 2 | Disable functions - match on an array using regexp |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument 'arr' content (ARRAY) matched the rule '2' in %a/disabled_functions_param_array_r_keys.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt index 7d7d727..a642f2b 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt index c22b912..01f0a36 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_int.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '4' in %a/disabled_functions_param_array_several_levels_int.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt index f662d11..c2a66ee 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '5' in %a/disabled_functions_param_array_several_levels_keys.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt index 9ede4d8..27bbe24 100644 --- a/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_array_several_levels_keys_int.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on an array value buried in several levels | 2 | Disable functions - match on an array value buried in several levels |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -18,4 +18,4 @@ foo($a); | |||
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | cccc | 19 | cccc |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 \ No newline at end of file | 21 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo', because its argument '$arr' content (ARRAY) matched the rule '6' in %a/disabled_functions_param_array_several_levels_keys_int.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_broken_line.phpt b/src/tests/disable_function/disabled_functions_param_broken_line.phpt index f7a379d..806816d 100644 --- a/src/tests/disable_function/disabled_functions_param_broken_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_broken_line.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a specific line - broken configuration | 2 | Disable functions - match on a specific line - broken configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_broken_line.ini | 7 | sp.configuration_file={PWD}/config/disabled_functions_broken_line.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -10,9 +11,9 @@ system("echo 1337"); | |||
| 10 | system("echo 1338"); | 11 | system("echo 1338"); |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECTF-- | 13 | --EXPECTF-- |
| 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 | 14 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 |
| 14 | 15 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `line` on line 1 in Unknown on line 0 |
| 16 | 17 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 18 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | Could not startup. | 19 | Could not startup. |
diff --git a/src/tests/disable_function/disabled_functions_param_int.phpt b/src/tests/disable_function/disabled_functions_param_int.phpt index 4fa87e1..6c04849 100644 --- a/src/tests/disable_function/disabled_functions_param_int.phpt +++ b/src/tests/disable_function/disabled_functions_param_int.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_int.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -19,4 +19,4 @@ foobar("10"); | |||
| 19 | --EXPECTF-- | 19 | --EXPECTF-- |
| 20 | 1 | 20 | 1 |
| 21 | 21 | ||
| 22 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 \ No newline at end of file | 22 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foobar', because its argument '$id' content (42) matched a rule in %a/disabled_functions_param_int.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt index 67da890..e409300 100644 --- a/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_invalid_pos.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position | 2 | Disable functions - match on argument's position |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini | 7 | sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| @@ -9,9 +10,9 @@ sp.configuration_file={PWD}/config/disabled_functions_invalid_pos.ini | |||
| 9 | system("echo 1"); | 10 | system("echo 1"); |
| 10 | ?> | 11 | ?> |
| 11 | --EXPECTF-- | 12 | --EXPECTF-- |
| 12 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 | 13 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Failed to parse arg 'qwe' of `pos` on line 1 in Unknown on line 0 |
| 15 | 16 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | Could not startup. | 18 | Could not startup. |
diff --git a/src/tests/disable_function/disabled_functions_param_line.phpt b/src/tests/disable_function/disabled_functions_param_line.phpt index 9d2daba..bbd8a9a 100644 --- a/src/tests/disable_function/disabled_functions_param_line.phpt +++ b/src/tests/disable_function/disabled_functions_param_line.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on a specific line | 2 | Disable functions - match on a specific line |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_line.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_line.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ system("id"); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | 1337 | 13 | 1337 |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_param_line.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_param_pos.phpt b/src/tests/disable_function/disabled_functions_param_pos.phpt index 468c09e..bacca62 100644 --- a/src/tests/disable_function/disabled_functions_param_pos.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position | 2 | Disable functions - match on argument's position |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,6 +9,6 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini | |||
| 9 | system("id"); | 9 | system("id"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 | 12 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_param_pos.php on line 2 |
| 13 | 13 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_pos.php on line %d | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_pos.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_param_pos2.phpt b/src/tests/disable_function/disabled_functions_param_pos2.phpt index a33ffe6..06ab5aa 100644 --- a/src/tests/disable_function/disabled_functions_param_pos2.phpt +++ b/src/tests/disable_function/disabled_functions_param_pos2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position, not the first time | 2 | Disable functions - match on argument's position, not the first time |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ strtoupper("od"); | |||
| 10 | strtoupper("id"); | 10 | strtoupper("id"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper', because its argument 'str' content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'strtoupper', because its argument %s content (id) matched the rule 'strlen array' in %a/disabled_functions_param_pos2.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_param_r.phpt b/src/tests/disable_function/disabled_functions_param_r.phpt index 1f066b6..3d8a362 100644 --- a/src/tests/disable_function/disabled_functions_param_r.phpt +++ b/src/tests/disable_function/disabled_functions_param_r.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_r.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ system("id"); | |||
| 10 | system("echo win"); | 10 | system("echo win"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (id) matched a rule in %a/disabled_functions_param_r.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_param_str_representation.phpt b/src/tests/disable_function/disabled_functions_param_str_representation.phpt index 7cbdc0f..179ce93 100644 --- a/src/tests/disable_function/disabled_functions_param_str_representation.phpt +++ b/src/tests/disable_function/disabled_functions_param_str_representation.phpt | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - casting various types to string internally | 2 | Disable functions - casting various types to string internally |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini | 7 | sp.configuration_file={PWD}/config/config_disabled_functions_param_str_representation.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_parse_class.phpt b/src/tests/disable_function/disabled_functions_parse_class.phpt index af9ed88..e62fe40 100644 --- a/src/tests/disable_function/disabled_functions_parse_class.phpt +++ b/src/tests/disable_function/disabled_functions_parse_class.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Parsing of an Object as a return value of a function | 2 | Disable functions - Parsing of an Object as a return value of a function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_pos_type.phpt b/src/tests/disable_function/disabled_functions_pos_type.phpt index b033e8a..ba134ad 100644 --- a/src/tests/disable_function/disabled_functions_pos_type.phpt +++ b/src/tests/disable_function/disabled_functions_pos_type.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - match on argument's position | 2 | Disable functions - match on argument's position |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_pos.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,8 +9,8 @@ sp.configuration_file={PWD}/config/disabled_functions_pos.ini | |||
| 9 | system([123, 456]); | 9 | system([123, 456]); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d | 12 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1337th argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d |
| 13 | 13 | ||
| 14 | Warning: [snuffleupagus][0.0.0.0][config] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d | 14 | Warning: [snuffleupagus][0.0.0.0][config][log] It seems that you wrote a rule filtering on the 1st argument of the function 'system', but it takes only 1 arguments. Matching on _all_ arguments instead. in %a/disabled_functions_pos_type.php on line %d |
| 15 | 15 | ||
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/disabled_functions_pos_type.php on line %d | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system', because its argument 'command' content (?) matched the rule '1' in %a/disabled_functions_pos_type.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt index e783c30..5f8b151 100644 --- a/src/tests/disable_function/disabled_functions_regexp_multiple.phpt +++ b/src/tests/disable_function/disabled_functions_regexp_multiple.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_regexp.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_regexp.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,9 +11,9 @@ echo strcmp("1", "2") . "\n"; | |||
| 11 | print("After") . "\n"; | 11 | print("After") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 | 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strtoupper' in %a/disabled_functions_regexp_multiple.php on line 2 |
| 15 | ID | 15 | ID |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 | 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'strcmp' in %a/disabled_functions_regexp_multiple.php on line 3 |
| 18 | -1 | 18 | -1 |
| 19 | After | 19 | After |
diff --git a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt index 623cadf..f33bb42 100644 --- a/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_shutdown_function.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Called with register_shutdown_function | 2 | Disable functions - Called with register_shutdown_function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -15,4 +15,4 @@ register_shutdown_function('my_super_function'); | |||
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | 1337 | 16 | 1337 |
| 17 | 17 | ||
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_shutdown_function.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_register_tick_function.phpt b/src/tests/disable_function/disabled_functions_register_tick_function.phpt index 8e6331e..623e424 100644 --- a/src/tests/disable_function/disabled_functions_register_tick_function.phpt +++ b/src/tests/disable_function/disabled_functions_register_tick_function.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Called with register_tick_function | 2 | Disable functions - Called with register_tick_function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,4 +16,4 @@ register_tick_function('my_super_function'); | |||
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | 1337 | 17 | 1337 |
| 18 | 18 | ||
| 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file | 19 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_functions_register_tick_function.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_require.phpt b/src/tests/disable_function/disabled_functions_require.phpt index af146d3..df2b2f0 100644 --- a/src/tests/disable_function/disabled_functions_require.phpt +++ b/src/tests/disable_function/disabled_functions_require.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Require | 2 | Disable functions - Require |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ unlink($dir . '/test.meh'); | |||
| 21 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 | 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require.php on line 6 |
diff --git a/src/tests/disable_function/disabled_functions_require_allow.phpt b/src/tests/disable_function/disabled_functions_require_allow.phpt index 1e3bc56..7ab29aa 100644 --- a/src/tests/disable_function/disabled_functions_require_allow.phpt +++ b/src/tests/disable_function/disabled_functions_require_allow.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Require (allow) | 2 | Disable functions - Require (allow) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require_allow.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_require_once.phpt b/src/tests/disable_function/disabled_functions_require_once.phpt index cd09671..7356c08 100644 --- a/src/tests/disable_function/disabled_functions_require_once.phpt +++ b/src/tests/disable_function/disabled_functions_require_once.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - require_once | 2 | Disable functions - require_once |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ unlink($dir . '/test.meh'); | |||
| 21 | ?> | 21 | ?> |
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 | 24 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'require_once', because its argument 'inclusion path' content (%a/test.meh) matched a rule in %a/disabled_functions_require_once.php on line 6 |
diff --git a/src/tests/disable_function/disabled_functions_require_simulation.phpt b/src/tests/disable_function/disabled_functions_require_simulation.phpt index 405bc18..fa1523c 100644 --- a/src/tests/disable_function/disabled_functions_require_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_require_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - Require (simulation) | 2 | Disable functions - Require (simulation) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_require.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -22,6 +22,6 @@ unlink($dir . '/test.sim'); | |||
| 22 | --EXPECTF-- | 22 | --EXPECTF-- |
| 23 | BLA | 23 | BLA |
| 24 | 24 | ||
| 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 | 25 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'require', because its argument 'inclusion path' content (%a/test.sim) matched a rule in %a/disabled_functions_require_simulation.php on line 6 |
| 26 | MEH | 26 | MEH |
| 27 | 1337 | 27 | 1337 |
diff --git a/src/tests/disable_function/disabled_functions_ret.phpt b/src/tests/disable_function/disabled_functions_ret.phpt index ab1b263..c1f2876 100644 --- a/src/tests/disable_function/disabled_functions_ret.phpt +++ b/src/tests/disable_function/disabled_functions_ret.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -10,4 +10,4 @@ echo strpos("pouet", "p"); | |||
| 10 | echo stripos("pouet", "p"); | 10 | echo stripos("pouet", "p"); |
| 11 | ?> | 11 | ?> |
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 \ No newline at end of file | 13 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_ret2.phpt b/src/tests/disable_function/disabled_functions_ret2.phpt index 1f3b02d..2cc9b98 100644 --- a/src/tests/disable_function/disabled_functions_ret2.phpt +++ b/src/tests/disable_function/disabled_functions_ret2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret.ini | |||
| 9 | echo stripos("pouet", "p"); | 9 | echo stripos("pouet", "p"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'stripos', because the function returned '0', which matched a rule in %a/disabled_functions_ret2.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_ret3.phpt b/src/tests/disable_function/disabled_functions_ret3.phpt index aa2d7d2..8a8f7cd 100644 --- a/src/tests/disable_function/disabled_functions_ret3.phpt +++ b/src/tests/disable_function/disabled_functions_ret3.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret.ini |
| 7 | memory_limit=-1 | 7 | memory_limit=-1 |
| @@ -20,4 +20,4 @@ echo("We're at the end of the execution.\n"); | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | We're in function `a`. | 21 | We're in function `a`. |
| 22 | 22 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 \ No newline at end of file | 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'Bob::a', because the function returned '2', which matched a rule in %a/disabled_functions_ret3.php on line 9 |
diff --git a/src/tests/disable_function/disabled_functions_ret_allow.phpt b/src/tests/disable_function/disabled_functions_ret_allow.phpt index 1690995..90fe4c7 100644 --- a/src/tests/disable_function/disabled_functions_ret_allow.phpt +++ b/src/tests/disable_function/disabled_functions_ret_allow.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret`. | 2 | Disable functions check on `ret`. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_ret_allow_value.phpt b/src/tests/disable_function/disabled_functions_ret_allow_value.phpt index 881a006..c7785fd 100644 --- a/src/tests/disable_function/disabled_functions_ret_allow_value.phpt +++ b/src/tests/disable_function/disabled_functions_ret_allow_value.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` allowed | 2 | Disable functions check on `ret` allowed |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow_value.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_allow_value.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt index b306fb9..f434e25 100644 --- a/src/tests/disable_function/disabled_functions_ret_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_ret_right_hash.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_right_hash.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_right_hash.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ system("echo $((1 + 1336))"); | |||
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | 1337 | 12 | 1337 |
| 13 | 13 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'system', because the function returned '1337', which matched a rule in %a/disabled_functions_ret_right_hash.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_simulation.phpt b/src/tests/disable_function/disabled_functions_ret_simulation.phpt index 70691ee..ca9dc7f 100644 --- a/src/tests/disable_function/disabled_functions_ret_simulation.phpt +++ b/src/tests/disable_function/disabled_functions_ret_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` simulation | 2 | Disable functions check on `ret` simulation |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,10 +11,10 @@ echo stripos("pouet", "p") . "\n"; | |||
| 11 | strcmp("p", "p") . "\n"; | 11 | strcmp("p", "p") . "\n"; |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 | 14 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'strpos', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 2 |
| 15 | 0 | 15 | 0 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 | 17 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on return of the function 'stripos', because the function returned '0', which matched the rule '1' in %a/disabled_functions_ret_simulation.php on line 3 |
| 18 | 0 | 18 | 0 |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file | 20 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strcmp', because the function returned '0', which matched a rule in %a/disabled_functions_ret_simulation.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type.phpt b/src/tests/disable_function/disabled_functions_ret_type.phpt index 9679f01..3a9a230 100644 --- a/src/tests/disable_function/disabled_functions_ret_type.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (false) | 2 | Disable functions check on `ret` by type matching (false) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo strpos("pouet", "123"); | |||
| 14 | int(0) | 14 | int(0) |
| 15 | 1337 | 15 | 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned 'FALSE', which matched the rule 'Return value is FALSE' in %a/disabled_functions_ret_type.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_array.phpt b/src/tests/disable_function/disabled_functions_ret_type_array.phpt index 1b20e53..3dcb0f2 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_array.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_array.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (array). | 2 | Disable functions check on `ret` by type matching (array). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_array.ini | |||
| 9 | echo get_loaded_extensions(); | 9 | echo get_loaded_extensions(); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'get_loaded_extensions', because the function returned 'ARRAY', which matched the rule 'Return value is an array' in %a/disabled_functions_ret_type_array.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_double.phpt b/src/tests/disable_function/disabled_functions_ret_type_double.phpt index 1810b88..df5b1ae 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_double.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_double.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (double). | 2 | Disable functions check on `ret` by type matching (double). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_double.ini | |||
| 9 | echo cos(0.5) . "\n"; | 9 | echo cos(0.5) . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'cos', because the function returned '0.877583', which matched the rule 'Return value is a double' in %a/disabled_functions_ret_type_double.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_long.phpt b/src/tests/disable_function/disabled_functions_ret_type_long.phpt index c5c9e38..5da1103 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_long.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_long.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (long). | 2 | Disable functions check on `ret` by type matching (long). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_long.ini | |||
| 9 | echo strpos("pouet", "o") . "\n"; | 9 | echo strpos("pouet", "o") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '1', which matched the rule 'Return value is a long' in %a/disabled_functions_ret_type_long.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_null.phpt b/src/tests/disable_function/disabled_functions_ret_type_null.phpt index b245a95..c2c6880 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_null.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_null.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (null). | 2 | Disable functions check on `ret` by type matching (null). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_null.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_null.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ function my_function() { | |||
| 13 | var_dump(my_function()); | 13 | var_dump(my_function()); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'my_function', because the function returned 'NULL', which matched the rule 'Return value is null' in %a/disabled_functions_ret_type_null.php on line 6 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_object.phpt b/src/tests/disable_function/disabled_functions_ret_type_object.phpt index a4d1c9a..a6a3519 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_object.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_object.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (object). | 2 | Disable functions check on `ret` by type matching (object). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_object.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_object.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ $var = a(); | |||
| 13 | echo "fail"; | 13 | echo "fail"; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'a', because the function returned 'OBJECT', which matched a rule in %a/disabled_functions_ret_type_object.php on line 5 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt index 67ae2a6..cf30d95 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_resource.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_resource.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (resource). | 2 | Disable functions check on `ret` by type matching (resource). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_resource.ini | |||
| 9 | echo fopen("/etc/passwd", "r"); | 9 | echo fopen("/etc/passwd", "r"); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'fopen', because the function returned 'RESOURCE', which matched the rule 'Return value is a resource' in %a/disabled_functions_ret_type_resource.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_str.phpt b/src/tests/disable_function/disabled_functions_ret_type_str.phpt index 0dcdaaa..48a0c04 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_str.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_str.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (string). | 2 | Disable functions check on `ret` by type matching (string). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions_ret_type_str.ini | |||
| 9 | echo substr("pouet", 3) . "\n"; | 9 | echo substr("pouet", 3) . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'substr', because the function returned 'et', which matched the rule 'Return value is a string' in %a/disabled_functions_ret_type_str.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_type_true.phpt b/src/tests/disable_function/disabled_functions_ret_type_true.phpt index 6a4749a..7cc1e38 100644 --- a/src/tests/disable_function/disabled_functions_ret_type_true.phpt +++ b/src/tests/disable_function/disabled_functions_ret_type_true.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` by type matching (true). | 2 | Disable functions check on `ret` by type matching (true). |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_true.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_ret_type_true.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo is_numeric("1234") . "\n"; | |||
| 14 | bool(false) | 14 | bool(false) |
| 15 | 1337 | 15 | 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'is_numeric', because the function returned 'TRUE', which matched the rule 'Return value is a true' in %a/disabled_functions_ret_type_true.php on line 4 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_user.phpt b/src/tests/disable_function/disabled_functions_ret_user.phpt index 989a7ab..040756c 100644 --- a/src/tests/disable_function/disabled_functions_ret_user.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Check NULL return value for user func | 2 | Check NULL return value for user func |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ qwe(); | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user.php on line %d | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_ret_user_used.phpt b/src/tests/disable_function/disabled_functions_ret_user_used.phpt index 05e1323..7499e1c 100644 --- a/src/tests/disable_function/disabled_functions_ret_user_used.phpt +++ b/src/tests/disable_function/disabled_functions_ret_user_used.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Check return value for user func | 2 | Check return value for user func |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_ret_user.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ function qwe() { | |||
| 12 | echo qwe(); | 12 | echo qwe(); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user_used.php on line %d | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'qwe', because the function returned 'asd', which matched a rule in %a/disabled_functions_ret_user_used.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_ret_val.phpt b/src/tests/disable_function/disabled_functions_ret_val.phpt index a914c56..0bf39bb 100644 --- a/src/tests/disable_function/disabled_functions_ret_val.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions ret val | 2 | Disable functions ret val |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_retval.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_retval.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ echo str_repeat("fufufu",1); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | fufu | 13 | fufu |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt index c8fb2c3..5e36900 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_dump.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_dump.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions ret val - dump | 2 | Disable functions ret val - dump |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_dump.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_dump.ini |
| 7 | --ENV-- | 7 | --ENV-- |
| @@ -20,4 +20,4 @@ echo str_repeat("fufufu",1); | |||
| 20 | --EXPECTF-- | 20 | --EXPECTF-- |
| 21 | fufu | 21 | fufu |
| 22 | 22 | ||
| 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3 | 23 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_dump.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt index 9623ef4..fa3f5ca 100644 --- a/src/tests/disable_function/disabled_functions_ret_val_rx.phpt +++ b/src/tests/disable_function/disabled_functions_ret_val_rx.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions ret val rx | 2 | Disable functions ret val rx |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions_retval_rx.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ echo str_repeat("fufufu",1); | |||
| 12 | --EXPECTF-- | 12 | --EXPECTF-- |
| 13 | fufu | 13 | fufu |
| 14 | 14 | ||
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'str_repeat', because the function returned 'fufufu', which matched a rule in %a/disabled_functions_ret_val_rx.php on line 3 |
diff --git a/src/tests/disable_function/disabled_functions_right_hash.phpt b/src/tests/disable_function/disabled_functions_right_hash.phpt index f3c5fb3..1c6e3d1 100644 --- a/src/tests/disable_function/disabled_functions_right_hash.phpt +++ b/src/tests/disable_function/disabled_functions_right_hash.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_right_hash.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_right_hash.ini |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/disable_function/disabled_functions_runtime.phpt b/src/tests/disable_function/disabled_functions_runtime.phpt index cd6f44d..3d74b40 100644 --- a/src/tests/disable_function/disabled_functions_runtime.phpt +++ b/src/tests/disable_function/disabled_functions_runtime.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - runtime inclusion | 2 | Disable functions - runtime inclusion |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_runtime.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -29,4 +29,4 @@ unlink("file_to_include2.php"); | |||
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | 1338 | 30 | 1338 |
| 31 | 31 | ||
| 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 | 32 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'test', because its argument '$param' content (1337) matched a rule in %a/src/file_to_include%d.php on line 1 |
diff --git a/src/tests/disable_function/disabled_functions_upper.phpt b/src/tests/disable_function/disabled_functions_upper.phpt index f7cdcbb..412eb7d 100644 --- a/src/tests/disable_function/disabled_functions_upper.phpt +++ b/src/tests/disable_function/disabled_functions_upper.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - uppercase | 2 | Disable functions - uppercase |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ vaR_DUmp("this is a super test"); | |||
| 13 | echo sTRPOs("pouet", "o"); | 13 | echo sTRPOs("pouet", "o"); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 \ No newline at end of file | 16 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_upper.php on line 2 |
diff --git a/src/tests/disable_function/disabled_functions_variadic.phpt b/src/tests/disable_function/disabled_functions_variadic.phpt index 32b6b0e..7658ec8 100644 --- a/src/tests/disable_function/disabled_functions_variadic.phpt +++ b/src/tests/disable_function/disabled_functions_variadic.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions - support for variadic functions | 2 | Disable functions - support for variadic functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_functions_variadic.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,6 +13,6 @@ function foo(...$b) { | |||
| 13 | echo foo(5, 4, 3, 2, 1); | 13 | echo foo(5, 4, 3, 2, 1); |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Warning: [snuffleupagus][0.0.0.0][disable_function] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/jvoisin/snuffleupagus/issues/164 for details. in %a/disabled_functions_variadic.php on line %d | 16 | Warning: [snuffleupagus][0.0.0.0][disable_function][log] Snuffleupagus doesn't support variadic functions yet, sorry. Check https://github.com/jvoisin/snuffleupagus/issues/164 for details. in %a/disabled_functions_variadic.php on line %d |
| 17 | 17 | ||
| 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php on line %d | 18 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'foo' in %a/disabled_functions_variadic.php on line %d |
diff --git a/src/tests/disable_function/disabled_functions_zero_cidr.phpt b/src/tests/disable_function/disabled_functions_zero_cidr.phpt index 0ec596c..4fd0bb9 100644 --- a/src/tests/disable_function/disabled_functions_zero_cidr.phpt +++ b/src/tests/disable_function/disabled_functions_zero_cidr.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions | 2 | Disable functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --ENV-- | 5 | --ENV-- |
| 6 | return <<<EOF | 6 | return <<<EOF |
| 7 | REMOTE_ADDR=127.0.0.1 | 7 | REMOTE_ADDR=127.0.0.1 |
| @@ -14,4 +14,4 @@ system("echo 42"); | |||
| 14 | printf("1337"); | 14 | printf("1337"); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file | 17 | Fatal error: [snuffleupagus][127.0.0.1][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_functions_zero_cidr.php on line 2 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_native_functions_indirect.phpt b/src/tests/disable_function/disabled_native_functions_indirect.phpt index bcbb1eb..ebb1c74 100644 --- a/src/tests/disable_function/disabled_native_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_native_functions_indirect.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disabled native functions, called indirectly | 2 | Disabled native functions, called indirectly |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/disabled_functions.ini | 6 | sp.configuration_file={PWD}/config/disabled_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/disabled_functions.ini | |||
| 9 | array_map('system', [1,2,3,4]); | 9 | array_map('system', [1,2,3,4]); |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/disabled_native_functions_indirect.php on line 2 |
diff --git a/src/tests/disable_function/disabled_user_functions.phpt b/src/tests/disable_function/disabled_user_functions.phpt index 66303ec..62c357b 100644 --- a/src/tests/disable_function/disabled_user_functions.phpt +++ b/src/tests/disable_function/disabled_user_functions.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disabled user-created functions | 2 | Disabled user-created functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ function my_super_function() { | |||
| 12 | my_super_function(); | 12 | my_super_function(); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/disabled_user_functions_indirect.phpt b/src/tests/disable_function/disabled_user_functions_indirect.phpt index 6631866..bc57871 100644 --- a/src/tests/disable_function/disabled_user_functions_indirect.phpt +++ b/src/tests/disable_function/disabled_user_functions_indirect.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disabled user-created functions, called indirectly | 2 | Disabled user-created functions, called indirectly |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini | 6 | sp.configuration_file={PWD}/config/config_disabled_user_functions.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -12,4 +12,4 @@ function my_super_function() { | |||
| 12 | array_map('my_super_function', [1,2,3,4]); | 12 | array_map('my_super_function', [1,2,3,4]); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'my_super_function' in %a/disabled_user_functions_indirect.php on line 3 \ No newline at end of file |
diff --git a/src/tests/disable_function/noncore_function_hooking.phpt b/src/tests/disable_function/noncore_function_hooking.phpt index a1639e5..ac7d987 100644 --- a/src/tests/disable_function/noncore_function_hooking.phpt +++ b/src/tests/disable_function/noncore_function_hooking.phpt | |||
| @@ -12,4 +12,4 @@ function custom_fun($a) { | |||
| 12 | custom_fun("hello"); | 12 | custom_fun("hello"); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'custom_fun' in %a/noncore_function_hooking.php on line 3 \ No newline at end of file |
diff --git a/src/tests/dump_request/config/dump_request.ini b/src/tests/dump_request/config/dump_request.ini index 974601d..734b718 100644 --- a/src/tests/dump_request/config/dump_request.ini +++ b/src/tests/dump_request/config/dump_request.ini | |||
| @@ -1 +1,2 @@ | |||
| 1 | sp.disable_function.function("system").drop().dump("/tmp/dump_result/").simulation(); | 1 | sp.disable_function.function("system").drop().dump("/tmp/dump_result/").simulation(); |
| 2 | sp.disable_function.function("a").drop().dump("/tmp/dump_result/").simulation(); | ||
diff --git a/src/tests/dump_request/dump_eval_blacklist.phpt b/src/tests/dump_request/dump_eval_blacklist.phpt index f3c0b2b..07c17f2 100644 --- a/src/tests/dump_request/dump_eval_blacklist.phpt +++ b/src/tests/dump_request/dump_eval_blacklist.phpt | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | Dump eval blacklist | 2 | Dump eval blacklist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) die "skip"; | 5 | if (!extension_loaded("snuffleupagus")) print "skip"; |
| 6 | ?> | 6 | ?> |
| 7 | --POST-- | 7 | --POST-- |
| 8 | post_a=data_post_a&post_b=data_post_b | 8 | post_a=data_post_a&post_b=data_post_b |
| @@ -25,16 +25,16 @@ eval('$a = strtoupper("1234");'); | |||
| 25 | echo "After eval: $a\n"; | 25 | echo "After eval: $a\n"; |
| 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 27 | $res = file($filename); | 27 | $res = file($filename); |
| 28 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 28 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 29 | echo "1\n"; | 29 | echo "Invalid GET"; |
| 30 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 30 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 31 | echo "2\n"; | 31 | echo "Invalid POST"; |
| 32 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 32 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 33 | echo "3\n"; | 33 | echo "Invalid COOKIE"; |
| 34 | } | 34 | } |
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | Outside of eval: 1337 1337 1337 | 37 | Outside of eval: 1337 1337 1337 |
| 38 | 38 | ||
| 39 | Warning: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 | 39 | Warning: [snuffleupagus][0.0.0.0][eval][simulation] A call to strtoupper was tried in eval, in %a/dump_eval_blacklist.php:1, logging it. in %a/dump_eval_blacklist.php(9) : eval()'d code on line 1 |
| 40 | After eval: 1234 | 40 | After eval: 1234 |
diff --git a/src/tests/dump_request/dump_eval_whitelist.phpt b/src/tests/dump_request/dump_eval_whitelist.phpt index d4f5305..09f5523 100644 --- a/src/tests/dump_request/dump_eval_whitelist.phpt +++ b/src/tests/dump_request/dump_eval_whitelist.phpt | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | Dump eval whitelist | 2 | Dump eval whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) die "skip"; | 5 | if (!extension_loaded("snuffleupagus")) print "skip"; |
| 6 | ?> | 6 | ?> |
| 7 | --POST-- | 7 | --POST-- |
| 8 | post_a=data_post_a&post_b=data_post_b | 8 | post_a=data_post_a&post_b=data_post_b |
| @@ -35,12 +35,12 @@ eval('$a = my_other_fun("1234");'); | |||
| 35 | echo "After eval: $a\n"; | 35 | echo "After eval: $a\n"; |
| 36 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 36 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 37 | $res = file($filename); | 37 | $res = file($filename); |
| 38 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 38 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 39 | echo "1\n"; | 39 | echo "Invalid GETn"; |
| 40 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 40 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 41 | echo "2\n"; | 41 | echo "Invalid POST\n"; |
| 42 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 42 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 43 | echo "3\n"; | 43 | echo "Invalid COOKIE\n"; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | ?> | 46 | ?> |
| @@ -48,5 +48,5 @@ if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | |||
| 48 | Outside of eval: my_fun: 1337 1337 1337 | 48 | Outside of eval: my_fun: 1337 1337 1337 |
| 49 | After allowed eval: my_fun: 1234 | 49 | After allowed eval: my_fun: 1234 |
| 50 | 50 | ||
| 51 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/dump_eval_whitelist.php on line 12 | 51 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/dump_eval_whitelist.php on line 12 |
| 52 | After eval: my_other_fun: 1234 | 52 | After eval: my_other_fun: 1234 |
diff --git a/src/tests/dump_request/dump_request.phpt b/src/tests/dump_request/dump_request.phpt index 8e174f8..d18580b 100644 --- a/src/tests/dump_request/dump_request.phpt +++ b/src/tests/dump_request/dump_request.phpt | |||
| @@ -29,16 +29,16 @@ echo "1\n"; | |||
| 29 | system("echo 1337;"); | 29 | system("echo 1337;"); |
| 30 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 30 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 31 | $res = file($filename); | 31 | $res = file($filename); |
| 32 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 32 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 33 | echo "1\n"; | 33 | echo "Invalid GET"; |
| 34 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 34 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 35 | echo "2\n"; | 35 | echo "Invalid POST"; |
| 36 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 36 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 37 | echo "3\n"; | 37 | echo "Invalid COOKIE"; |
| 38 | } | 38 | } |
| 39 | ?> | 39 | ?> |
| 40 | --EXPECTF-- | 40 | --EXPECTF-- |
| 41 | 1 | 41 | 1 |
| 42 | 42 | ||
| 43 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request.php on line 7 | 43 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request.php on line 7 |
| 44 | 1337 | 44 | 1337 |
diff --git a/src/tests/dump_request/dump_request_invalid_folder.phpt b/src/tests/dump_request/dump_request_invalid_folder.phpt index 79a1935..2eea791 100644 --- a/src/tests/dump_request/dump_request_invalid_folder.phpt +++ b/src/tests/dump_request/dump_request_invalid_folder.phpt | |||
| @@ -21,6 +21,6 @@ echo "2\n"; | |||
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | 1 | 22 | 1 |
| 23 | 23 | ||
| 24 | Warning: [snuffleupagus][0.0.0.0][request_logging] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/dump_request_invalid_folder.php on line %d | 24 | Warning: [snuffleupagus][0.0.0.0][request_logging][log] Unable to create the folder '/root/NON_EXISTENT/FOLDER/PLEASE/' in %a/dump_request_invalid_folder.php on line %d |
| 25 | 25 | ||
| 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_invalid_folder.php on line %d | 26 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/dump_request_invalid_folder.php on line %d |
diff --git a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt index 5292467..fc70341 100644 --- a/src/tests/dump_request/dump_request_nonwriteable_folder.phpt +++ b/src/tests/dump_request/dump_request_nonwriteable_folder.phpt | |||
| @@ -3,6 +3,7 @@ Dump request - nonwriteable folder. | |||
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) { print "skip"; } | 5 | if (!extension_loaded("snuffleupagus")) { print "skip"; } |
| 6 | if ("ubuntu" == getenv("CI_JOB_IMAGE")) { print "skip"; } | ||
| 6 | 7 | ||
| 7 | // root has write privileges "any" folders | 8 | // root has write privileges "any" folders |
| 8 | if (TRUE == function_exists("posix_getuid")) { | 9 | if (TRUE == function_exists("posix_getuid")) { |
| @@ -33,6 +34,6 @@ echo "2\n"; | |||
| 33 | --EXPECTF-- | 34 | --EXPECTF-- |
| 34 | 1 | 35 | 1 |
| 35 | 36 | ||
| 36 | Warning: [snuffleupagus][0.0.0.0][request_logging] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d | 37 | Warning: [snuffleupagus][0.0.0.0][request_logging][log] Unable to open %a: Permission denied in %a/dump_request_nonwriteable_folder.php on line %d |
| 37 | 38 | ||
| 38 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 | 39 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on call of the function 'system' in %a/dump_request_nonwriteable_folder.php on line 3 |
diff --git a/src/tests/dump_request/dump_request_stacktrace.phpt b/src/tests/dump_request/dump_request_stacktrace.phpt new file mode 100644 index 0000000..0a8b94e --- /dev/null +++ b/src/tests/dump_request/dump_request_stacktrace.phpt | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | --TEST-- | ||
| 2 | Dump request | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) { | ||
| 6 | print "skip"; | ||
| 7 | } | ||
| 8 | |||
| 9 | foreach (glob("/tmp/dump_result/sp_dump.*") as $dump) { | ||
| 10 | @unlink($dump); | ||
| 11 | } | ||
| 12 | @rmdir("/tmp/dump_result/"); | ||
| 13 | ?> | ||
| 14 | --POST-- | ||
| 15 | post_a=data_post_a&post_b=data_post_b | ||
| 16 | --GET-- | ||
| 17 | get_a=data_get_a&get_b=data_get_b | ||
| 18 | --COOKIE-- | ||
| 19 | cookie_a=data_cookie_a&cookie_b=data_cookie_b | ||
| 20 | --INI-- | ||
| 21 | sp.configuration_file={PWD}/config/dump_request.ini | ||
| 22 | --FILE-- | ||
| 23 | <?php | ||
| 24 | @mkdir("/tmp/dump_result/"); | ||
| 25 | foreach (glob("/tmp/dump_result/sp_dump.*") as $dump) { | ||
| 26 | @unlink($dump); | ||
| 27 | } | ||
| 28 | echo "1\n"; | ||
| 29 | function a(){ echo "a"; } | ||
| 30 | function b(){ a(); } | ||
| 31 | function c(){ b(); } | ||
| 32 | function d(){ c(); } | ||
| 33 | d(); | ||
| 34 | |||
| 35 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | ||
| 36 | $res = file($filename); | ||
| 37 | //var_dump($res) . "\n"; | ||
| 38 | if ($res[2] != "STACKTRACE: a:7\n") { | ||
| 39 | echo "Invalid STACKTRACE for a"; | ||
| 40 | } elseif ($res[3] != "STACKTRACE: b:8\n") { | ||
| 41 | echo "Invalid STACKTRACE for b"; | ||
| 42 | } elseif ($res[4] != "STACKTRACE: c:9\n") { | ||
| 43 | echo "Invalid STACKTRACE for c"; | ||
| 44 | } elseif ($res[5] != "STACKTRACE: d:10\n") { | ||
| 45 | echo "Invalid STACKTRACE for d"; | ||
| 46 | } elseif ($res[6] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | ||
| 47 | echo "Invalid GET"; | ||
| 48 | } elseif ($res[7] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | ||
| 49 | echo "Invalid POST"; | ||
| 50 | } elseif ($res[8] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | ||
| 51 | echo "Invalid COOKIE"; | ||
| 52 | } | ||
| 53 | ?> | ||
| 54 | --EXPECTF-- | ||
| 55 | 1 | ||
| 56 | |||
| 57 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'a' in %a/dump_request_stacktrace.php on line 7 | ||
| 58 | a | ||
diff --git a/src/tests/dump_request/dump_request_too_big.phpt b/src/tests/dump_request/dump_request_too_big.phpt index 6a3f590..e82ddc4 100644 --- a/src/tests/dump_request/dump_request_too_big.phpt +++ b/src/tests/dump_request/dump_request_too_big.phpt | |||
| @@ -29,16 +29,16 @@ echo "1\n"; | |||
| 29 | system("echo 1337;"); | 29 | system("echo 1337;"); |
| 30 | $filename = glob('/tmp/dump_result/*')[0]; | 30 | $filename = glob('/tmp/dump_result/*')[0]; |
| 31 | $res = file($filename); | 31 | $res = file($filename); |
| 32 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' get_c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBBB' \n") { |
| 33 | echo "1\n"; | 33 | echo "Invalid GET"; |
| 34 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' post_c='c' \n") { | 34 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' post_c='c' \n") { |
| 35 | echo "2\n"; | 35 | echo "Invalid POST"; |
| 36 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b&data_cookie_c=cookie_c' \n") { | 36 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b&data_cookie_c=cookie_c' \n") { |
| 37 | echo "3\n"; | 37 | echo "Invalid COOKIE"; |
| 38 | } | 38 | } |
| 39 | ?> | 39 | ?> |
| 40 | --EXPECTF-- | 40 | --EXPECTF-- |
| 41 | 1 | 41 | 1 |
| 42 | 42 | ||
| 43 | Warning: [snuffleupagus][127.0.0.1][disabled_function] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php on line 8 | 43 | Warning: [snuffleupagus][127.0.0.1][disabled_function][simulation] Aborted execution on call of the function 'system' in %a/dump_request_too_big.php on line 8 |
| 44 | 1337 | 44 | 1337 |
diff --git a/src/tests/dump_request/dump_segfault1.phpt b/src/tests/dump_request/dump_segfault1.phpt index 27f8af8..4e241d7 100644 --- a/src/tests/dump_request/dump_segfault1.phpt +++ b/src/tests/dump_request/dump_segfault1.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Disable functions check on `ret` with an alias | 2 | Disable functions check on `ret` with an alias |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_dump_segfault1.ini | 6 | sp.configuration_file={PWD}/config/config_dump_segfault1.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -9,4 +9,4 @@ sp.configuration_file={PWD}/config/config_dump_segfault1.ini | |||
| 9 | echo strpos("pouet", "p") . "\n"; | 9 | echo strpos("pouet", "p") . "\n"; |
| 10 | ?> | 10 | ?> |
| 11 | --EXPECTF-- | 11 | --EXPECTF-- |
| 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file | 12 | Fatal error: [snuffleupagus][0.0.0.0][disabled_function][drop] Aborted execution on return of the function 'strpos', because the function returned '0', which matched the rule 'test' in %a/dump_segfault1.php on line 2 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_backlist.phpt b/src/tests/eval_blacklist/eval_backlist.phpt index 67643d7..fa32b4b 100644 --- a/src/tests/eval_blacklist/eval_backlist.phpt +++ b/src/tests/eval_blacklist/eval_backlist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist | 2 | Eval blacklist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo "After eval: $a\n"; | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 1337 1337 1337 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 | 17 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/eval_backlist.php:1, dropping it. in %a/eval_backlist.php(4) : eval()'d code on line 1 |
diff --git a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt index 7578eac..4c37263 100644 --- a/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt +++ b/src/tests/eval_blacklist/eval_backlist_call_user_func.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - with several calls in an eval. | 2 | Eval blacklist - with several calls in an eval. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -11,4 +11,4 @@ eval(' | |||
| 11 | ') | 11 | ') |
| 12 | ?> | 12 | ?> |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d | 14 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %s/eval_backlist_call_user_func.php:%d, dropping it. in %s/eval_backlist_call_user_func.php(%d) : eval()'d code on line %d |
diff --git a/src/tests/eval_blacklist/eval_backlist_chained.phpt b/src/tests/eval_blacklist/eval_backlist_chained.phpt index 7eabc02..820ef1d 100644 --- a/src/tests/eval_blacklist/eval_backlist_chained.phpt +++ b/src/tests/eval_blacklist/eval_backlist_chained.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - with several calls in an eval. | 2 | Eval blacklist - with several calls in an eval. |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -13,4 +13,4 @@ eval(' | |||
| 13 | ') | 13 | ') |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d | 16 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %s/eval_backlist_chained.php:%d, dropping it. in %s/eval_backlist_chained.php(%d) : eval()'d code on line %d |
diff --git a/src/tests/eval_blacklist/eval_backlist_list.phpt b/src/tests/eval_blacklist/eval_backlist_list.phpt index 7cb0183..725a9bb 100644 --- a/src/tests/eval_blacklist/eval_backlist_list.phpt +++ b/src/tests/eval_blacklist/eval_backlist_list.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - with a list of functions | 2 | Eval blacklist - with a list of functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist_list.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist_list.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,4 +14,4 @@ echo "After eval: $a\n"; | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 1337 1337 1337 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 | 17 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/eval_backlist_list.php:1, dropping it. in %a/eval_backlist_list.php(4) : eval()'d code on line 1 |
diff --git a/src/tests/eval_blacklist/eval_backlist_simulation.phpt b/src/tests/eval_blacklist/eval_backlist_simulation.phpt index d81398c..f09370d 100644 --- a/src/tests/eval_blacklist/eval_backlist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_backlist_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist simulation | 2 | Eval blacklist simulation |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist_simulation.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -14,5 +14,5 @@ echo "After eval: $a\n"; | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Outside of eval: 1337 1337 1337 | 15 | Outside of eval: 1337 1337 1337 |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 | 17 | Warning: [snuffleupagus][0.0.0.0][eval][simulation] A call to strtoupper was tried in eval, in %a/eval_backlist_simulation.php:1, logging it. in %a/eval_backlist_simulation.php(4) : eval()'d code on line 1 |
| 18 | After eval: 1234 | 18 | After eval: 1234 |
diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt index 7e6524b..de81402 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist | 2 | Eval whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ echo "After eval: $a\n"; | |||
| 21 | Outside of eval: my_fun: 1337 1337 1337 | 21 | Outside of eval: my_fun: 1337 1337 1337 |
| 22 | After allowed eval: my_fun: 1234 | 22 | After allowed eval: my_fun: 1234 |
| 23 | 23 | ||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file | 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist.php(10) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt index 8b05821..82abe02 100644 --- a/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_backlist_whitelist_builtin.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist/blacklist, on builtin functions | 2 | Eval whitelist/blacklist, on builtin functions |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist_blacklist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ echo "After eval: $a\n"; | |||
| 21 | Outside of eval: 1.5574077246549 | 21 | Outside of eval: 1.5574077246549 |
| 22 | After allowed eval: 1.5574077246549 | 22 | After allowed eval: 1.5574077246549 |
| 23 | 23 | ||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file | 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'cos' isn't in the eval whitelist, dropping its call. in %a/eval_backlist_whitelist_builtin.php(10) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist.phpt b/src/tests/eval_blacklist/eval_whitelist.phpt index d5b9d1c..016b599 100644 --- a/src/tests/eval_blacklist/eval_whitelist.phpt +++ b/src/tests/eval_blacklist/eval_whitelist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist | 2 | Eval whitelist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -25,4 +25,4 @@ echo "After eval: $a\n"; | |||
| 25 | Outside of eval: my_fun: 1337 1337 1337 | 25 | Outside of eval: my_fun: 1337 1337 1337 |
| 26 | After allowed eval: my_fun: 1234 | 26 | After allowed eval: my_fun: 1234 |
| 27 | 27 | ||
| 28 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file | 28 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt index 9b406b5..4494878 100644 --- a/src/tests/eval_blacklist/eval_whitelist_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_builtin.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist - builtin function | 2 | Eval whitelist - builtin function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -17,4 +17,4 @@ echo "After eval: $a\n"; | |||
| 17 | Outside of eval: 0.54030230586814 | 17 | Outside of eval: 0.54030230586814 |
| 18 | After allowed eval: 0.28366218546323 | 18 | After allowed eval: 0.28366218546323 |
| 19 | 19 | ||
| 20 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file | 20 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_builtin.php(6) : eval()'d code on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt index f3be8a8..825480f 100644 --- a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist - builtin function | 2 | Eval whitelist - builtin function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -27,4 +27,4 @@ unlink($dir . '/test.bla'); | |||
| 27 | Outside of eval: 0.54030230586814 | 27 | Outside of eval: 0.54030230586814 |
| 28 | After allowed eval: 0.28366218546323 | 28 | After allowed eval: 0.28366218546323 |
| 29 | 29 | ||
| 30 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file | 30 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/test.bla on line 1 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt index 7648dad..0f6f879 100644 --- a/src/tests/eval_blacklist/eval_whitelist_simulation.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_simulation.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist simulation | 2 | Eval whitelist simulation |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist_simulation.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist_simulation.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -25,5 +25,5 @@ echo "After eval: $a\n"; | |||
| 25 | Outside of eval: my_fun: 1337 1337 1337 | 25 | Outside of eval: my_fun: 1337 1337 1337 |
| 26 | After allowed eval: my_fun: 1234 | 26 | After allowed eval: my_fun: 1234 |
| 27 | 27 | ||
| 28 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 | 28 | Warning: [snuffleupagus][0.0.0.0][Eval_whitelist][simulation] The function 'my_other_fun' isn't in the eval whitelist, logging its call. in %a/eval_whitelist_simulation.php on line 7 |
| 29 | After eval: my_other_fun: 1234 \ No newline at end of file | 29 | After eval: my_other_fun: 1234 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt index aeb4d70..6d4a579 100644 --- a/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_user_then_builtin.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval whitelist - builtin function | 2 | Eval whitelist - builtin function |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -21,4 +21,4 @@ echo "After eval: $a\n"; | |||
| 21 | --EXPECTF-- | 21 | --EXPECTF-- |
| 22 | Outside of eval: -0.54402111088937 | 22 | Outside of eval: -0.54402111088937 |
| 23 | 23 | ||
| 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file | 24 | Fatal error: [snuffleupagus][0.0.0.0][Eval_whitelist][drop] The function 'sin' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist_user_then_builtin.php on line 4 \ No newline at end of file |
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist.phpt b/src/tests/eval_blacklist/nested_eval_blacklist.phpt index 2d99449..8ff0b6d 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - nested eval | 2 | Eval blacklist - nested eval |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -26,4 +26,4 @@ Inception lvl 1... | |||
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | 28 | ||
| 29 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 | 29 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code:3, dropping it. in %a/nested_eval_blacklist.php(5) : eval()'d code(4) : eval()'d code(4) : eval()'d code on line 3 |
diff --git a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt index d84a1f6..37f8967 100644 --- a/src/tests/eval_blacklist/nested_eval_blacklist2.phpt +++ b/src/tests/eval_blacklist/nested_eval_blacklist2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Eval blacklist - nested eval, with a twist | 2 | Eval blacklist - nested eval, with a twist |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/eval_backlist.ini | 6 | sp.configuration_file={PWD}/config/eval_backlist.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -26,4 +26,4 @@ Inception lvl 1... | |||
| 26 | Inception lvl 2... | 26 | Inception lvl 2... |
| 27 | Inception lvl 3... | 27 | Inception lvl 3... |
| 28 | 28 | ||
| 29 | Fatal error: [snuffleupagus][0.0.0.0][eval] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 | 29 | Fatal error: [snuffleupagus][0.0.0.0][eval][drop] A call to strtoupper was tried in eval, in %a/nested_eval_blacklist2.php(5) : eval()'d code:7, dropping it. in %a/nested_eval_blacklist2.php(5) : eval()'d code(4) : eval()'d code on line 7 |
diff --git a/src/tests/glob_config.phpt b/src/tests/glob_config.phpt index 2d62c3a..499d20b 100644 --- a/src/tests/glob_config.phpt +++ b/src/tests/glob_config.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Multiple configuration files | 2 | Multiple configuration files |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_multi*.ini | 6 | sp.configuration_file={PWD}/config/config_multi*.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,8 +16,8 @@ foo(); | |||
| 16 | bla(); | 16 | bla(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 | 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %a/glob_config.php on line 3 |
| 20 | 1 | 20 | 1 |
| 21 | 21 | ||
| 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 | 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %a/glob_config.php on line 6 |
| 23 | 2 \ No newline at end of file | 23 | 2 \ No newline at end of file |
diff --git a/src/tests/global_strict/global_strict.phpt b/src/tests/global_strict/global_strict.phpt index e06721c..07dc979 100644 --- a/src/tests/global_strict/global_strict.phpt +++ b/src/tests/global_strict/global_strict.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Global strict mode | 2 | Global strict mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/global_strict.ini | 7 | sp.configuration_file={PWD}/config/global_strict.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/global_strict/global_strict_disabled.phpt b/src/tests/global_strict/global_strict_disabled.phpt index ca3ddfa..c948444 100644 --- a/src/tests/global_strict/global_strict_disabled.phpt +++ b/src/tests/global_strict/global_strict_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Global strict mode | 2 | Global strict mode |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/global_strict_disabled.ini | 7 | sp.configuration_file={PWD}/config/global_strict_disabled.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/harden_rand/harden_rand_noargs.phpt b/src/tests/harden_rand/harden_rand_noargs.phpt index dc7d832..9abbffa 100644 --- a/src/tests/harden_rand/harden_rand_noargs.phpt +++ b/src/tests/harden_rand/harden_rand_noargs.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Harden rand without any arguments | 2 | Harden rand without any arguments |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/harden_rand.ini | 7 | sp.configuration_file={PWD}/config/harden_rand.ini |
| 7 | We should fix this | 8 | We should fix this |
diff --git a/src/tests/harden_rand_php8/config/harden_rand.ini b/src/tests/harden_rand_php8/config/harden_rand.ini new file mode 100644 index 0000000..89e19be --- /dev/null +++ b/src/tests/harden_rand_php8/config/harden_rand.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.harden_random.enable(); | |||
diff --git a/src/tests/harden_rand_php8/harden_rand_noargs.phpt b/src/tests/harden_rand_php8/harden_rand_noargs.phpt new file mode 100644 index 0000000..5f00c8f --- /dev/null +++ b/src/tests/harden_rand_php8/harden_rand_noargs.phpt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | --TEST-- | ||
| 2 | Harden rand without any arguments | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/harden_rand.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | rand(); | ||
| 11 | mt_rand(); | ||
| 12 | |||
| 13 | rand(1); | ||
| 14 | mt_rand(1); | ||
| 15 | |||
| 16 | rand(1, 2); | ||
| 17 | mt_rand(1, 2); | ||
| 18 | |||
| 19 | rand(2, 1); | ||
| 20 | mt_rand(2, 1); | ||
| 21 | |||
| 22 | rand(2, 1, 0); | ||
| 23 | mt_rand(2, 1, 0); | ||
| 24 | |||
| 25 | rand("test", 1); | ||
| 26 | mt_rand("test", 1); | ||
| 27 | |||
| 28 | rand(1, "test"); | ||
| 29 | mt_rand(1, "test"); | ||
| 30 | |||
| 31 | rand(1, 2, "test"); | ||
| 32 | mt_rand(1, 2, "test"); | ||
| 33 | |||
| 34 | echo "Everything is fine\n"; | ||
| 35 | echo "Absolutely everything\n"; | ||
| 36 | echo 'Even with single quotes'; | ||
| 37 | ?> | ||
| 38 | --EXPECTF-- | ||
| 39 | Fatal error: Uncaught ArgumentCountError: rand() expects exactly 2 arguments, 1 given in %s/tests/harden_rand_php8/harden_rand_noargs.php:5 | ||
| 40 | Stack trace: | ||
| 41 | #0 %s/tests/harden_rand_php8/harden_rand_noargs.php(5): rand(1) | ||
| 42 | #1 {main} | ||
| 43 | thrown in %s/tests/harden_rand_php8/harden_rand_noargs.php on line 5 | ||
diff --git a/src/tests/inexistent_conf_file.phpt b/src/tests/inexistent_conf_file.phpt index 9b5e3d6..cd10665 100644 --- a/src/tests/inexistent_conf_file.phpt +++ b/src/tests/inexistent_conf_file.phpt | |||
| @@ -2,14 +2,15 @@ | |||
| 2 | Check for snuffleupagus presence | 2 | Check for snuffleupagus presence |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/unexistent_configuration_file.ini | 7 | sp.configuration_file={PWD}/config/unexistent_configuration_file.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | <?php ?> | 9 | <?php ?> |
| 9 | --EXPECTF-- | 10 | --EXPECTF-- |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 15 | Could not startup. \ No newline at end of file | 16 | Could not startup. |
diff --git a/src/tests/inexistent_conf_file_list.phpt b/src/tests/inexistent_conf_file_list.phpt index b8b3bea..6cac934 100644 --- a/src/tests/inexistent_conf_file_list.phpt +++ b/src/tests/inexistent_conf_file_list.phpt | |||
| @@ -2,14 +2,15 @@ | |||
| 2 | Non-existent configuration file in a list | 2 | Non-existent configuration file in a list |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_configuration_file | 7 | sp.configuration_file={PWD}/../../config/default.rules,{PWD}/non_existent_configuration_file |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | <?php ?> | 9 | <?php ?> |
| 9 | --EXPECTF-- | 10 | --EXPECTF-- |
| 10 | PHP Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | 11 | PHP Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 |
| 11 | 12 | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][config] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 |
| 13 | 14 | ||
| 14 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 15 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 15 | Could not startup. \ No newline at end of file | 16 | Could not startup. |
diff --git a/src/tests/loading.phpt b/src/tests/loading.phpt index d48703e..2514ec5 100644 --- a/src/tests/loading.phpt +++ b/src/tests/loading.phpt | |||
| @@ -7,5 +7,5 @@ Check for snuffleupagus presence | |||
| 7 | echo "snuffleupagus extension is available"; | 7 | echo "snuffleupagus extension is available"; |
| 8 | ?> | 8 | ?> |
| 9 | --EXPECT-- | 9 | --EXPECT-- |
| 10 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 10 | Warning: [snuffleupagus][0.0.0.0][config][log] No configuration specificed via sp.configuration_file in Unknown on line 0 |
| 11 | Could not startup. | 11 | snuffleupagus extension is available |
diff --git a/src/tests/multi_config.phpt b/src/tests/multi_config.phpt index 558d9a1..dbd38c0 100644 --- a/src/tests/multi_config.phpt +++ b/src/tests/multi_config.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Multiple configuration files | 2 | Multiple configuration files |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_multi2.ini,{PWD}/config/config_multi1.ini | 6 | sp.configuration_file={PWD}/config/config_multi2.ini,{PWD}/config/config_multi1.ini |
| 7 | --FILE-- | 7 | --FILE-- |
| @@ -16,8 +16,8 @@ foo(); | |||
| 16 | bla(); | 16 | bla(); |
| 17 | ?> | 17 | ?> |
| 18 | --EXPECTF-- | 18 | --EXPECTF-- |
| 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 | 19 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'foo' in %a/multi_config.php on line 3 |
| 20 | 1 | 20 | 1 |
| 21 | 21 | ||
| 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 | 22 | Warning: [snuffleupagus][0.0.0.0][disabled_function][simulation] Aborted execution on call of the function 'bla' in %a/multi_config.php on line 6 |
| 23 | 2 \ No newline at end of file | 23 | 2 \ No newline at end of file |
diff --git a/src/tests/php8/inexistent_conf_file.phpt b/src/tests/php8/inexistent_conf_file.phpt new file mode 100644 index 0000000..ac763aa --- /dev/null +++ b/src/tests/php8/inexistent_conf_file.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Test for unexistent configuration file, in php8 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/unexistent_configuration_file.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php ?> | ||
| 10 | --EXPECTF-- | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/config/unexistent_configuration_file.ini : No such file or directory in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/php8/inexistent_conf_file_list.phpt b/src/tests/php8/inexistent_conf_file_list.phpt new file mode 100644 index 0000000..2309fc6 --- /dev/null +++ b/src/tests/php8/inexistent_conf_file_list.phpt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --TEST-- | ||
| 2 | Non-existent configuration file in a list in php8 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/../../../config/default.rules,{PWD}/non_existent_configuration_file | ||
| 8 | --FILE-- | ||
| 9 | <?php ?> | ||
| 10 | --EXPECTF-- | ||
| 11 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Could not open configuration file %a/non_existent_configuration_file : No such file or directory in Unknown on line 0 | ||
| 12 | |||
| 13 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 | ||
| 14 | Could not startup. | ||
diff --git a/src/tests/phplog.phpt b/src/tests/phplog.phpt new file mode 100644 index 0000000..9c5600e --- /dev/null +++ b/src/tests/phplog.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check the phplog output | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/phplog.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(unserialize('s:1:"a";')); | ||
| 10 | ?> | ||
| 11 | --EXPECTF-- | ||
| 12 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %s/tests/phplog.php on line 2 | ||
| 13 | |||
diff --git a/src/tests/rips_configuration.phpt b/src/tests/rips_configuration.phpt index 31d1266..7c197e5 100644 --- a/src/tests/rips_configuration.phpt +++ b/src/tests/rips_configuration.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Shipped configuration (rips) | 2 | Shipped configuration (rips) |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/rips.rules | 6 | sp.configuration_file={PWD}/../../config/rips.rules |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/samesite_cookies.phpt b/src/tests/samesite_cookies.phpt index 5ba92a3..ffe0a0b 100644 --- a/src/tests/samesite_cookies.phpt +++ b/src/tests/samesite_cookies.phpt | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | Cookie samesite | 2 | Cookie samesite |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php | 4 | <?php |
| 5 | if (!extension_loaded("snuffleupagus")) die("skip"); | 5 | if (!extension_loaded("snuffleupagus")) print("skip"); |
| 6 | ?> | 6 | ?> |
| 7 | --INI-- | 7 | --INI-- |
| 8 | sp.configuration_file={PWD}/config/config_samesite_cookies.ini | 8 | sp.configuration_file={PWD}/config/config_samesite_cookies.ini |
diff --git a/src/tests/session_encryption/crypt_session_corrupted_session.phpt b/src/tests/session_encryption/crypt_session_corrupted_session.phpt index 2c4f085..a89faf4 100644 --- a/src/tests/session_encryption/crypt_session_corrupted_session.phpt +++ b/src/tests/session_encryption/crypt_session_corrupted_session.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler | 2 | Set a custom session handler |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_path = "/tmp" | 7 | session.save_path = "/tmp" |
| @@ -27,4 +27,4 @@ session_start(); | |||
| 27 | var_dump($_SESSION); | 27 | var_dump($_SESSION); |
| 28 | ?> | 28 | ?> |
| 29 | --EXPECTF-- | 29 | --EXPECTF-- |
| 30 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption] Buffer underflow tentative detected in cookie encryption handling in %s/crypt_session_corrupted_session.php on line %s | 30 | Fatal error: [snuffleupagus][127.0.0.1][cookie_encryption][drop] Buffer underflow tentative detected in cookie encryption handling in %s/crypt_session_corrupted_session.php on line %s |
diff --git a/src/tests/session_encryption/crypt_session_invalid.phpt b/src/tests/session_encryption/crypt_session_invalid.phpt index 9d9a88a..9ec7c50 100644 --- a/src/tests/session_encryption/crypt_session_invalid.phpt +++ b/src/tests/session_encryption/crypt_session_invalid.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt and bad decrypt | 2 | SESSION crypt and bad decrypt |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | --ENV-- | 7 | --ENV-- |
| @@ -21,4 +21,4 @@ session_start(); // Re start the session, It will read and decrypt the non em | |||
| 21 | var_dump($_SESSION); // Dump the session | 21 | var_dump($_SESSION); // Dump the session |
| 22 | ?> | 22 | ?> |
| 23 | --EXPECTF-- | 23 | --EXPECTF-- |
| 24 | Warning: [snuffleupagus][127.0.0.2][cookie_encryption] Something went wrong with the decryption of the session in %s/crypt_session_invalid.php on line %d | 24 | Warning: [snuffleupagus][127.0.0.2][cookie_encryption][log] Something went wrong with the decryption of the session in %s/crypt_session_invalid.php on line %d |
diff --git a/src/tests/session_encryption/crypt_session_invalid_simul.phpt b/src/tests/session_encryption/crypt_session_invalid_simul.phpt index 7bfefcb..cbb80dc 100644 --- a/src/tests/session_encryption/crypt_session_invalid_simul.phpt +++ b/src/tests/session_encryption/crypt_session_invalid_simul.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt and bad decrypt | 2 | SESSION crypt and bad decrypt |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/crypt_session_read_uncrypt.phpt b/src/tests/session_encryption/crypt_session_read_uncrypt.phpt index f15d8b6..5e81b52 100644 --- a/src/tests/session_encryption/crypt_session_read_uncrypt.phpt +++ b/src/tests/session_encryption/crypt_session_read_uncrypt.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt/decrypt valid | 2 | SESSION crypt/decrypt valid |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/crypt_session_valid.phpt b/src/tests/session_encryption/crypt_session_valid.phpt index bf9fea0..c272486 100644 --- a/src/tests/session_encryption/crypt_session_valid.phpt +++ b/src/tests/session_encryption/crypt_session_valid.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt/decrypt valid | 2 | SESSION crypt/decrypt valid |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/crypt_session_valid_simul.phpt b/src/tests/session_encryption/crypt_session_valid_simul.phpt index 28083cf..d63277d 100644 --- a/src/tests/session_encryption/crypt_session_valid_simul.phpt +++ b/src/tests/session_encryption/crypt_session_valid_simul.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | SESSION crypt/decrypt valid | 2 | SESSION crypt/decrypt valid |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session_simul.ini |
| 7 | --ENV-- | 7 | --ENV-- |
diff --git a/src/tests/session_encryption/set_custom_session_handler.phpt b/src/tests/session_encryption/set_custom_session_handler.phpt index 5b46fbc..725ee43 100644 --- a/src/tests/session_encryption/set_custom_session_handler.phpt +++ b/src/tests/session_encryption/set_custom_session_handler.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler | 2 | Set a custom session handler |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_path = "/tmp" | 7 | session.save_path = "/tmp" |
diff --git a/src/tests/session_encryption/set_custom_session_handler2.phpt b/src/tests/session_encryption/set_custom_session_handler2.phpt index 18bc3f7..8cc6786 100644 --- a/src/tests/session_encryption/set_custom_session_handler2.phpt +++ b/src/tests/session_encryption/set_custom_session_handler2.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler, twice | 2 | Set a custom session handler, twice |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_path = "/tmp" | 7 | session.save_path = "/tmp" |
diff --git a/src/tests/session_encryption/set_custom_session_handler_ini.phpt b/src/tests/session_encryption/set_custom_session_handler_ini.phpt index 7ed56d6..f9fbfb2 100644 --- a/src/tests/session_encryption/set_custom_session_handler_ini.phpt +++ b/src/tests/session_encryption/set_custom_session_handler_ini.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Set a custom session handler | 2 | Set a custom session handler |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini | 6 | sp.configuration_file={PWD}/config/config_crypt_session.ini |
| 7 | session.save_handler = | 7 | session.save_handler = |
diff --git a/src/tests/shipped_configuration.phpt b/src/tests/shipped_configuration.phpt index dd6b92b..b171304 100644 --- a/src/tests/shipped_configuration.phpt +++ b/src/tests/shipped_configuration.phpt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | --TEST-- | 1 | --TEST-- |
| 2 | Shipped configuration | 2 | Shipped configuration |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | --INI-- | 5 | --INI-- |
| 6 | sp.configuration_file={PWD}/../../config/default.rules | 6 | sp.configuration_file={PWD}/../../config/default.rules |
| 7 | --FILE-- | 7 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt index e8cd77b..e292f5e 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison in_array disabled | 2 | Sloppy comparison in_array disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt index 8841b4c..3cc02c2 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_keys_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison array_keys disabled | 2 | Sloppy comparison array_keys disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt b/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt index bee3752..2da4a17 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_array_search_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison array_search disabled | 2 | Sloppy comparison array_search disabled |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt b/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt index e42c919..cdcd9a8 100644 --- a/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt +++ b/src/tests/sloppy_comparison/sloppy_comparison_disable.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Sloppy comparison | 2 | Sloppy comparison |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.allow_broken_configuration=On | 7 | sp.allow_broken_configuration=On |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/stream_wrapper/stream_wrapper.phpt b/src/tests/stream_wrapper/stream_wrapper.phpt index 3336ef6..588a10d 100644 --- a/src/tests/stream_wrapper/stream_wrapper.phpt +++ b/src/tests/stream_wrapper/stream_wrapper.phpt | |||
| @@ -25,10 +25,10 @@ Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget | |||
| 25 | 25 | ||
| 26 | Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: %s | 26 | Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: %s |
| 27 | 27 | ||
| 28 | Warning: file_get_contents(https://qweqwezxc): failed to open stream: php_network_getaddresses: getaddrinfo failed: %s | 28 | Warning: file_get_contents(https://qweqwezxc): %s to open stream: php_network_getaddresses: getaddrinfo failed: %s |
| 29 | 29 | ||
| 30 | Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper.php on line %d | 30 | Warning: file_get_contents(ftp://qweqwezxc): %s to open stream: operation failed in %a/stream_wrapper.php on line %d |
| 31 | 31 | ||
| 32 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d | 32 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper.php on line %d |
| 33 | 33 | ||
| 34 | Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper.php on line %d | 34 | Warning: file_get_contents(lelel://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper.php on line %d |
diff --git a/src/tests/stream_wrapper/stream_wrapper_register.phpt b/src/tests/stream_wrapper/stream_wrapper_register.phpt index 39514e9..27d8afb 100644 --- a/src/tests/stream_wrapper/stream_wrapper_register.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_register.phpt | |||
| @@ -22,4 +22,4 @@ Warning: fopen(): Unable to find the wrapper "lolol" - did you forget to enable | |||
| 22 | 22 | ||
| 23 | Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d | 23 | Warning: fopen(): file:// wrapper is disabled in the server configuration in %a/stream_wrapper_register.php on line %d |
| 24 | 24 | ||
| 25 | Warning: fopen(lolol://asdasd): failed to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d | 25 | Warning: fopen(lolol://asdasd): %s to open stream: no suitable wrapper could be found in %a/stream_wrapper_register.php on line %d |
diff --git a/src/tests/stream_wrapper/stream_wrapper_restore.phpt b/src/tests/stream_wrapper/stream_wrapper_restore.phpt index b4a29c8..4f110ee 100644 --- a/src/tests/stream_wrapper/stream_wrapper_restore.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_restore.phpt | |||
| @@ -2,16 +2,17 @@ | |||
| 2 | Stream wrapper | 2 | Stream wrapper |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini | 7 | sp.configuration_file={PWD}/config/config_stream_wrapper_register.ini |
| 7 | --FILE-- | 8 | --FILE-- |
| 8 | <?php | 9 | <?php |
| 9 | stream_wrapper_restore("file"); | 10 | stream_wrapper_restore("stdin"); |
| 10 | fopen("file://asdasd", "r"); | 11 | fopen("stdin://asdasd", "r"); |
| 11 | ?> | 12 | ?> |
| 12 | --EXPECTF-- | 13 | --EXPECTF-- |
| 13 | Notice: stream_wrapper_restore(): file:// was never changed, nothing to restore in %a/stream_wrapper_restore.php on line %d | 14 | %s |
| 14 | 15 | ||
| 15 | Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d | 16 | Warning: fopen(): Unable to find the wrapper "stdin" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_restore.php on line %d |
| 16 | 17 | ||
| 17 | Warning: fopen(file://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d | 18 | Warning: fopen(stdin://asdasd): failed to open stream: No such file or directory in %a/stream_wrapper_restore.php on line %d |
diff --git a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt index 5a11c8f..54fd067 100644 --- a/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt +++ b/src/tests/stream_wrapper/stream_wrapper_without_openssl.phpt | |||
| @@ -19,10 +19,10 @@ Warning: Unknown: Unable to find the wrapper "php" - did you forget to enable it | |||
| 19 | 19 | ||
| 20 | Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 2 | 20 | Warning: file_get_contents(): Unable to find the wrapper "http" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 2 |
| 21 | 21 | ||
| 22 | Warning: file_get_contents(http://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 2 | 22 | Warning: file_get_contents(http://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 2 |
| 23 | 23 | ||
| 24 | Warning: file_get_contents(ftp://qweqwezxc): failed to open stream: operation failed in %a/stream_wrapper_without_openssl.php on line 3 | 24 | Warning: file_get_contents(ftp://qweqwezxc): %s to open stream: operation failed in %a/stream_wrapper_without_openssl.php on line 3 |
| 25 | 25 | ||
| 26 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 4 | 26 | Warning: file_get_contents(): Unable to find the wrapper "lelel" - did you forget to enable it when you configured PHP? in %a/stream_wrapper_without_openssl.php on line 4 |
| 27 | 27 | ||
| 28 | Warning: file_get_contents(lelel://qweqwezxc): failed to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 4 | 28 | Warning: file_get_contents(lelel://qweqwezxc): %s to open stream: No such file or directory in %a/stream_wrapper_without_openssl.php on line 4 |
diff --git a/src/tests/strict_mode/config/config_strict_mode_disabled.ini b/src/tests/strict_mode/config/config_strict_mode_disabled.ini new file mode 100644 index 0000000..2e68471 --- /dev/null +++ b/src/tests/strict_mode/config/config_strict_mode_disabled.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global_strict.disable(); | |||
diff --git a/src/tests/strict_mode/config/config_strict_mode_enabled.ini b/src/tests/strict_mode/config/config_strict_mode_enabled.ini new file mode 100644 index 0000000..2dc11fc --- /dev/null +++ b/src/tests/strict_mode/config/config_strict_mode_enabled.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global_strict.enable(); | |||
diff --git a/src/tests/strict_mode/strict_mode_disabled.phpt b/src/tests/strict_mode/strict_mode_disabled.phpt new file mode 100644 index 0000000..105f43c --- /dev/null +++ b/src/tests/strict_mode/strict_mode_disabled.phpt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --TEST-- | ||
| 2 | Strict mode disabled | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing"; | ||
| 6 | ?> | ||
| 7 | --INI-- | ||
| 8 | sp.configuration_file={PWD}/config/config_strict_mode_disabled.ini | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | ini_set('display_errors', 1); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
diff --git a/src/tests/strict_mode/strict_mode_enabled.phpt b/src/tests/strict_mode/strict_mode_enabled.phpt new file mode 100644 index 0000000..a986987 --- /dev/null +++ b/src/tests/strict_mode/strict_mode_enabled.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Strict mode enabled | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) print "skip snuffleupagus extension missing"; | ||
| 6 | ?> | ||
| 7 | --INI-- | ||
| 8 | sp.configuration_file={PWD}/config/config_strict_mode_enabled.ini | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | ini_set('display_errors', 1); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | Fatal error: Uncaught TypeError: ini_set()%s given in %s/tests/strict_mode/strict_mode_enabled.php:%d | ||
| 15 | Stack trace: | ||
| 16 | #0 %s/tests/strict_mode/strict_mode_enabled.php(2): ini_set('display_errors', 1) | ||
| 17 | #1 {main} | ||
| 18 | thrown in %s/tests/strict_mode/strict_mode_enabled.php on line 2 | ||
diff --git a/src/tests/syslog.phpt b/src/tests/syslog.phpt new file mode 100644 index 0000000..5585677 --- /dev/null +++ b/src/tests/syslog.phpt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check the syslog output | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/syslog.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(unserialize('s:1:"a";')); | ||
| 10 | ?> | ||
| 11 | --EXPECTF-- | ||
diff --git a/src/tests/syslog_simulation.phpt b/src/tests/syslog_simulation.phpt new file mode 100644 index 0000000..4b12f58 --- /dev/null +++ b/src/tests/syslog_simulation.phpt | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --TEST-- | ||
| 2 | Check the syslog output, in simulation mode. | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/syslog_simulation.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | var_dump(unserialize('s:1:"a";')); | ||
| 10 | ?> | ||
| 11 | --EXPECTF-- | ||
diff --git a/src/tests/unserialize/dump_unserialize.phpt b/src/tests/unserialize/dump_unserialize.phpt index d07fcbe..1ef8dcb 100644 --- a/src/tests/unserialize/dump_unserialize.phpt +++ b/src/tests/unserialize/dump_unserialize.phpt | |||
| @@ -25,15 +25,15 @@ echo "1\n"; | |||
| 25 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdhflkasjdf')); | 25 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdhflkasjdf')); |
| 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; |
| 27 | $res = file($filename); | 27 | $res = file($filename); |
| 28 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | 28 | if ($res[3] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { |
| 29 | echo "1\n"; | 29 | echo "Invalid GET\n"; |
| 30 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | 30 | } elseif ($res[4] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { |
| 31 | echo "2\n"; | 31 | echo "Invalid POST\n"; |
| 32 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | 32 | } elseif ($res[5] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { |
| 33 | echo "3\n"; | 33 | echo "Invalid COOKIE\n"; |
| 34 | } | 34 | } |
| 35 | ?> | 35 | ?> |
| 36 | --EXPECTF-- | 36 | --EXPECTF-- |
| 37 | 1 | 37 | 1 |
| 38 | 38 | ||
| 39 | Fatal error: [snuffleupagus][0.0.0.0][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/dump_unserialize.php on line 8 | 39 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/dump_unserialize.php on line 8 |
diff --git a/src/tests/unserialize/unserialize_fail.phpt b/src/tests/unserialize/unserialize_fail.phpt index 5e7912c..88dabda 100644 --- a/src/tests/unserialize/unserialize_fail.phpt +++ b/src/tests/unserialize/unserialize_fail.phpt | |||
| @@ -12,4 +12,4 @@ var_dump(unserialize('s:1:"a";dslfjklfjfkjfdjffjfjads')); | |||
| 12 | var_dump(unserialize(1,2,3,4)); | 12 | var_dump(unserialize(1,2,3,4)); |
| 13 | ?> | 13 | ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Fatal error: [snuffleupagus][0.0.0.0][unserialize] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file | 15 | Fatal error: [snuffleupagus][0.0.0.0][unserialize][drop] The serialized object is too small. in %a/unserialize_fail.php on line 2 \ No newline at end of file |
diff --git a/src/tests/unserialize/unserialize_sim.phpt b/src/tests/unserialize/unserialize_sim.phpt index cbc02a4..9bff2c1 100644 --- a/src/tests/unserialize/unserialize_sim.phpt +++ b/src/tests/unserialize/unserialize_sim.phpt | |||
| @@ -14,5 +14,5 @@ var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdaw | |||
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" | 15 | s:1:"a";650609b417904d0d9bbf1fc44a975d13ecdf6b02b715c1a06271fb3b673f25b1string(1) "a" |
| 16 | 16 | ||
| 17 | Warning: [snuffleupagus][0.0.0.0][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/unserialize_sim.php on line 5 | 17 | Warning: [snuffleupagus][0.0.0.0][unserialize][simulation] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/unserialize_sim.php on line 5 |
| 18 | string(1) "a" | 18 | string(1) "a" |
diff --git a/src/tests/unserialize/unserialize_wrong_call.phpt b/src/tests/unserialize/unserialize_wrong_call.phpt index 729d020..a6fe140 100644 --- a/src/tests/unserialize/unserialize_wrong_call.phpt +++ b/src/tests/unserialize/unserialize_wrong_call.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Unserialize ok, but called with the wrong numeber of aguments | 2 | Unserialize ok, but called with the wrong numeber of aguments |
| 3 | --SKIPIF-- | 3 | --SKIPIF-- |
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> |
| 5 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 5 | --INI-- | 6 | --INI-- |
| 6 | sp.configuration_file={PWD}/config/config_serialize.ini | 7 | sp.configuration_file={PWD}/config/config_serialize.ini |
| 7 | --FILE-- | 8 | --FILE-- |
diff --git a/src/tests/unserialize_php8/config/config_serialize.ini b/src/tests/unserialize_php8/config/config_serialize.ini new file mode 100644 index 0000000..7de4438 --- /dev/null +++ b/src/tests/unserialize_php8/config/config_serialize.ini | |||
| @@ -0,0 +1 @@ | |||
| sp.global.secret_key("abcdef"); | |||
diff --git a/src/tests/unserialize_php8/unserialize_wrong_call.phpt b/src/tests/unserialize_php8/unserialize_wrong_call.phpt new file mode 100644 index 0000000..4c62356 --- /dev/null +++ b/src/tests/unserialize_php8/unserialize_wrong_call.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Unserialize ok, but called with the wrong number of arguments | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) print "skip"; ?> | ||
| 5 | <?php if (PHP_VERSION_ID < 80000) print "skip"; ?> | ||
| 6 | --INI-- | ||
| 7 | sp.configuration_file={PWD}/config/config_serialize.ini | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | $a=serialize("a"); | ||
| 11 | var_dump(unserialize($a, "too", "many", "aaaaaaaarguments!")); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | Fatal error: Uncaught ArgumentCountError: unserialize() expects at most 2 arguments, 4 given in %s/tests/unserialize_php8/unserialize_wrong_call.php:3 | ||
| 15 | Stack trace: | ||
| 16 | #0 %s/tests/unserialize_php8/unserialize_wrong_call.php(3): unserialize('s:1:"a";', 'too', 'many', 'aaaaaaaargument...') | ||
| 17 | #1 {main} | ||
| 18 | thrown in %s/tests/unserialize_php8/unserialize_wrong_call.php on line 3 | ||
diff --git a/src/tests/upload_validation/upload_validation.phpt b/src/tests/upload_validation/upload_validation.phpt index 4a45771..965d3aa 100644 --- a/src/tests/upload_validation/upload_validation.phpt +++ b/src/tests/upload_validation/upload_validation.phpt | |||
| @@ -13,6 +13,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 16 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 17 | 17 | ||
| 18 | Fatal error: [snuffleupagus][0.0.0.0][config] A rule can't be enabled and disabled on line 1 in Unknown on line 0 | 18 | 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 |
diff --git a/src/tests/upload_validation/upload_validation_invalid.phpt b/src/tests/upload_validation/upload_validation_invalid.phpt index 5d64f57..242bcee 100644 --- a/src/tests/upload_validation/upload_validation_invalid.phpt +++ b/src/tests/upload_validation/upload_validation_invalid.phpt | |||
| @@ -13,9 +13,9 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 13 | echo 1; | 13 | echo 1; |
| 14 | ?> | 14 | ?> |
| 15 | --EXPECTF-- | 15 | --EXPECTF-- |
| 16 | Warning: [snuffleupagus][0.0.0.0][upload_validation] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 | 16 | Warning: [snuffleupagus][0.0.0.0][upload_validation][log] Could not call './tests/data/upload_invalid.sh' : Exec format error in Unknown on line 0 |
| 17 | X-Powered-By: PHP/%a | 17 | X-Powered-By: PHP/%a |
| 18 | Content-type: text/html; charset=UTF-8%a | 18 | Content-type: text/html; charset=UTF-8%a |
| 19 | %a | 19 | %a |
| 20 | 20 | ||
| 21 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | 21 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 |
diff --git a/src/tests/upload_validation/upload_validation_ko.phpt b/src/tests/upload_validation/upload_validation_ko.phpt index 54f384a..0877861 100644 --- a/src/tests/upload_validation/upload_validation_ko.phpt +++ b/src/tests/upload_validation/upload_validation_ko.phpt | |||
| @@ -11,4 +11,4 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 11 | --blabla-- | 11 | --blabla-- |
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | --EXPECTF-- | 13 | --EXPECTF-- |
| 14 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file | 14 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 \ No newline at end of file |
diff --git a/src/tests/upload_validation/upload_validation_ko_simulation.phpt b/src/tests/upload_validation/upload_validation_ko_simulation.phpt index 553874c..a099641 100644 --- a/src/tests/upload_validation/upload_validation_ko_simulation.phpt +++ b/src/tests/upload_validation/upload_validation_ko_simulation.phpt | |||
| @@ -12,5 +12,5 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 12 | --FILE-- | 12 | --FILE-- |
| 13 | <?php echo 1337; ?> | 13 | <?php echo 1337; ?> |
| 14 | --EXPECTF-- | 14 | --EXPECTF-- |
| 15 | Warning: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | 15 | Warning: [snuffleupagus][0.0.0.0][upload_validation][simulation] The upload of test.php on ? was rejected. in Unknown on line 0 |
| 16 | 1337 \ No newline at end of file | 16 | 1337 \ No newline at end of file |
diff --git a/src/tests/upload_validation/upload_validation_no_exec.phpt b/src/tests/upload_validation/upload_validation_no_exec.phpt index cf935fd..b198bda 100644 --- a/src/tests/upload_validation/upload_validation_no_exec.phpt +++ b/src/tests/upload_validation/upload_validation_no_exec.phpt | |||
| @@ -14,6 +14,6 @@ Content-Disposition: form-data; name="test"; filename="test.php" | |||
| 14 | var_dump($_FILES); | 14 | var_dump($_FILES); |
| 15 | ?> | 15 | ?> |
| 16 | --EXPECTF-- | 16 | --EXPECTF-- |
| 17 | Fatal error: [snuffleupagus][0.0.0.0][config] Invalid configuration file in Unknown on line 0 | 17 | Fatal error: [snuffleupagus][0.0.0.0][config][log] Invalid configuration file in Unknown on line 0 |
| 18 | 18 | ||
| 19 | Fatal error: [snuffleupagus][0.0.0.0][config] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 | 19 | Fatal error: [snuffleupagus][0.0.0.0][config][log] The `script` (tests/data/upload_no_exec.sh) isn't executable on line 1 in Unknown on line 0 |
diff --git a/src/tests/upload_validation/upload_validation_real.phpt b/src/tests/upload_validation/upload_validation_real.phpt index 47df3d1..1c919ec 100644 --- a/src/tests/upload_validation/upload_validation_real.phpt +++ b/src/tests/upload_validation/upload_validation_real.phpt | |||
| @@ -6,8 +6,8 @@ if (!extension_loaded("snuffleupagus")) { | |||
| 6 | print "skip"; | 6 | print "skip"; |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | if (PHP_VERSION_ID >= 70300) { | 9 | if (PHP_VERSION_ID >= 80000) { |
| 10 | die("skip BROKEN with 7.3"); | 10 | print "skip"; |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { | 13 | if (strpos(system(PHP_BINARY . " -d error_log=/dev/null -d extension=vld.so -m 2>/dev/null"), "vld") === FALSE) { |
| @@ -41,4 +41,4 @@ Some random text again | |||
| 41 | echo 1; | 41 | echo 1; |
| 42 | ?> | 42 | ?> |
| 43 | --EXPECTF-- | 43 | --EXPECTF-- |
| 44 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation] The upload of test.php on ? was rejected. in Unknown on line 0 | 44 | Fatal error: [snuffleupagus][0.0.0.0][upload_validation][drop] The upload of test.php on ? was rejected. in Unknown on line 0 |
diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt deleted file mode 100644 index 58467f7..0000000 --- a/src/tests/xxe/disable_xxe_dom.phpt +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable XXE | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus") || !extension_loaded("dom")) print("skip"); ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disable_xxe.ini | ||
| 7 | --EXTENSIONS-- | ||
| 8 | dom | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | $dir = __DIR__; | ||
| 12 | $content = 'WARNING, external entity loaded!'; | ||
| 13 | file_put_contents('content.txt', $content); | ||
| 14 | |||
| 15 | $xml = <<<EOD | ||
| 16 | <?xml version="1.0"?> | ||
| 17 | <!DOCTYPE root | ||
| 18 | [ | ||
| 19 | <!ENTITY foo SYSTEM "file://$dir/content.txt"> | ||
| 20 | ]> | ||
| 21 | <test><testing>&foo;</testing></test> | ||
| 22 | EOD; | ||
| 23 | |||
| 24 | file_put_contents('content.xml', $xml); | ||
| 25 | |||
| 26 | libxml_disable_entity_loader(true); | ||
| 27 | $dom = new DOMDocument('1.0'); | ||
| 28 | $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | ||
| 29 | printf("libxml_disable_entity to true: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | ||
| 30 | |||
| 31 | libxml_disable_entity_loader(false); | ||
| 32 | $dom = new DOMDocument('1.0'); | ||
| 33 | $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | ||
| 34 | printf("libxml_disable_entity to false: %s\n", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | ||
| 35 | |||
| 36 | $xml = "<test><testing>foo</testing></test>"; | ||
| 37 | file_put_contents('content.xml', $xml); | ||
| 38 | |||
| 39 | libxml_disable_entity_loader(false); | ||
| 40 | $dom = new DOMDocument('1.0'); | ||
| 41 | $dom->loadXML($xml, LIBXML_DTDATTR|LIBXML_DTDLOAD|LIBXML_NOENT); | ||
| 42 | printf("without xxe: %s", $dom->getElementsByTagName('testing')->item(0)->nodeValue); | ||
| 43 | |||
| 44 | ?> | ||
| 45 | --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 | ||
| 47 | |||
| 48 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 49 | |||
| 50 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 51 | |||
| 52 | Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d | ||
| 53 | libxml_disable_entity to true: | ||
| 54 | |||
| 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 | ||
| 56 | |||
| 57 | Warning: DOMDocument::loadXML(): Failure to process entity foo in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 58 | |||
| 59 | Warning: DOMDocument::loadXML(): Entity 'foo' not defined in Entity, line: %d in %a/disable_xxe_dom.php on line %d | ||
| 60 | |||
| 61 | Notice: Trying to get property %a in %a/disable_xxe_dom.php on line %d | ||
| 62 | libxml_disable_entity to false: | ||
| 63 | without xxe: foo | ||
| 64 | --CLEAN-- | ||
| 65 | <?php | ||
| 66 | $dir = __DIR__; | ||
| 67 | unlink($dir . "content.xml"); | ||
| 68 | unlink($dir . "content.txt"); | ||
| 69 | ?> | ||
diff --git a/src/tests/xxe/disable_xxe_dom_disabled.phpt b/src/tests/xxe/disable_xxe_dom_disabled.phpt index fe88d76..493f5a3 100644 --- a/src/tests/xxe/disable_xxe_dom_disabled.phpt +++ b/src/tests/xxe/disable_xxe_dom_disabled.phpt | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | Disable XXE | 2 | Disable XXE |
| 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_disable.ini | 7 | sp.configuration_file={PWD}/config/disable_xxe_disable.ini |
| 7 | --EXTENSIONS-- | 8 | --EXTENSIONS-- |
diff --git a/src/tests/xxe/disable_xxe_xml_parse.phpt b/src/tests/xxe/disable_xxe_xml_parse.phpt index b6dec2d..6b48bea 100644 --- a/src/tests/xxe/disable_xxe_xml_parse.phpt +++ b/src/tests/xxe/disable_xxe_xml_parse.phpt | |||
| @@ -8,6 +8,7 @@ Disable XXE in xml_parse | |||
| 8 | echo "skip because the `xml` extension isn't loaded"; | 8 | echo "skip because the `xml` extension isn't loaded"; |
| 9 | } | 9 | } |
| 10 | ?> | 10 | ?> |
| 11 | <?php if (PHP_VERSION_ID >= 80000) print "skip"; ?> | ||
| 11 | --EXTENSIONS-- | 12 | --EXTENSIONS-- |
| 12 | xml | 13 | xml |
| 13 | --INI-- | 14 | --INI-- |
