diff options
Diffstat (limited to 'src/tests/eval_whitelist_include_then_user.phpt')
| -rw-r--r-- | src/tests/eval_whitelist_include_then_user.phpt | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/tests/eval_whitelist_include_then_user.phpt b/src/tests/eval_whitelist_include_then_user.phpt deleted file mode 100644 index 5ff3bff..0000000 --- a/src/tests/eval_whitelist_include_then_user.phpt +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | --TEST-- | ||
| 2 | Eval whitelist - builtin function | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/eval_whitelist.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | $b = 1337; | ||
| 10 | $dir = __DIR__; | ||
| 11 | |||
| 12 | file_put_contents($dir . '/test.bla', '<?php $b = sin(1) ?>'); | ||
| 13 | |||
| 14 | $a = cos(1); | ||
| 15 | echo "Outside of eval: $a\n"; | ||
| 16 | eval('$a = cos(5);'); | ||
| 17 | echo "After allowed eval: $a\n"; | ||
| 18 | eval("include_once('$dir' . '/test.bla');"); | ||
| 19 | echo "After eval: $b\n"; | ||
| 20 | ?> | ||
| 21 | --CLEAN-- | ||
| 22 | <?php | ||
| 23 | $dir = __DIR__; | ||
| 24 | unlink($dir . '/test.bla'); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | ||
| 27 | Outside of eval: 0.54030230586814 | ||
| 28 | After allowed eval: 0.28366218546323 | ||
| 29 | |||
| 30 | Fatal error: [snuffleupagus][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 | ||
