diff options
| author | Ben Fuhrmannek | 2015-02-06 22:38:35 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2015-02-06 22:38:35 +0100 |
| commit | 3741554097cc73f03a9a6a4fa4d65dc01c120bd8 (patch) | |
| tree | 93938c3a27b8b9d40818f652c30fccfee3b3180e /tests/executor/eval_blacklist_printf.phpt | |
| parent | 4085730874e1d88bb5b675633a171ae20989e45a (diff) | |
tests for eval white/blacklist + include white/blacklist
Diffstat (limited to 'tests/executor/eval_blacklist_printf.phpt')
| -rw-r--r-- | tests/executor/eval_blacklist_printf.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/executor/eval_blacklist_printf.phpt b/tests/executor/eval_blacklist_printf.phpt new file mode 100644 index 0000000..596036e --- /dev/null +++ b/tests/executor/eval_blacklist_printf.phpt | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing: suhosin.executor.eval.blacklist=printf via call_user_func | ||
| 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=printf | ||
| 9 | --FILE-- | ||
| 10 | <?php | ||
| 11 | eval('call_user_func("printf", "hello\n");'); | ||
| 12 | ?> | ||
| 13 | --EXPECTF-- | ||
| 14 | ALERT - function within eval blacklist called: printf() (attacker 'REMOTE_ADDR not set', file '%s : eval()'d code', line 1) | ||
| 15 | |||
| 16 | Warning: printf() has been disabled for security reasons in %s : eval()'d code on line 1 | ||
