diff options
Diffstat (limited to 'tests/executor/eval_blacklist.phpt')
| -rw-r--r-- | tests/executor/eval_blacklist.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/executor/eval_blacklist.phpt b/tests/executor/eval_blacklist.phpt new file mode 100644 index 0000000..586bebc --- /dev/null +++ b/tests/executor/eval_blacklist.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing: suhosin.executor.eval.blacklist=max | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifnotcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.sapi=64 | ||
| 7 | suhosin.executor.disable_eval=0 | ||
| 8 | suhosin.executor.eval.blacklist=max | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | eval('abs(1); | ||
| 12 | max(1,2); | ||
| 13 | abs(1);'); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | ALERT - function within eval blacklist called: max() (attacker 'REMOTE_ADDR not set', file '%s', line 4) | ||
| 17 | |||
| 18 | Warning: max() has been disabled for security reasons in %s : eval()'d code on line 2 | ||
