diff options
| author | jvoisin | 2022-12-10 12:00:36 +0100 |
|---|---|---|
| committer | jvoisin | 2022-12-11 18:36:26 +0100 |
| commit | eb570f29daa42fd8b90ecfff75382846e51b3a15 (patch) | |
| tree | 5d14199f0e9f97ec521aa69d2c55f14b21d94db7 /src/tests/eval_blacklist | |
| parent | 808e7bff7e17b4f22a64120162734301aa065db0 (diff) | |
Add support for PHP8.2
Diffstat (limited to 'src/tests/eval_blacklist')
| -rw-r--r-- | src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt | 10 |
1 files changed, 4 insertions, 6 deletions
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 825480f..e456ff9 100644 --- a/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt +++ b/src/tests/eval_blacklist/eval_whitelist_include_then_user.phpt | |||
| @@ -9,6 +9,9 @@ sp.configuration_file={PWD}/config/eval_whitelist.ini | |||
| 9 | $b = 1337; | 9 | $b = 1337; |
| 10 | $dir = __DIR__; | 10 | $dir = __DIR__; |
| 11 | 11 | ||
| 12 | // Just in case | ||
| 13 | @unlink($dir . '/test.bla'); | ||
| 14 | |||
| 12 | file_put_contents($dir . '/test.bla', '<?php $b = sin(1) ?>'); | 15 | file_put_contents($dir . '/test.bla', '<?php $b = sin(1) ?>'); |
| 13 | 16 | ||
| 14 | $a = cos(1); | 17 | $a = cos(1); |
| @@ -18,13 +21,8 @@ echo "After allowed eval: $a\n"; | |||
| 18 | eval("include_once('$dir' . '/test.bla');"); | 21 | eval("include_once('$dir' . '/test.bla');"); |
| 19 | echo "After eval: $b\n"; | 22 | echo "After eval: $b\n"; |
| 20 | ?> | 23 | ?> |
| 21 | --CLEAN-- | ||
| 22 | <?php | ||
| 23 | $dir = __DIR__; | ||
| 24 | unlink($dir . '/test.bla'); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | 24 | --EXPECTF-- |
| 27 | Outside of eval: 0.54030230586814 | 25 | Outside of eval: 0.54030230586814 |
| 28 | After allowed eval: 0.28366218546323 | 26 | After allowed eval: 0.28366218546323 |
| 29 | 27 | ||
| 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 | 28 | 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 |
