diff options
Diffstat (limited to 'tests/executor/function_blacklist_printf.phpt')
| -rw-r--r-- | tests/executor/function_blacklist_printf.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/executor/function_blacklist_printf.phpt b/tests/executor/function_blacklist_printf.phpt new file mode 100644 index 0000000..f60f938 --- /dev/null +++ b/tests/executor/function_blacklist_printf.phpt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing: suhosin.executor.func.blacklist=printf | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifnotcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.sapi=64 | ||
| 7 | suhosin.executor.func.blacklist=printf | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | call_user_func("printf", "hello\n"); | ||
| 11 | ?> | ||
| 12 | --EXPECTF-- | ||
| 13 | ALERT - function blacklisted: printf() (attacker 'REMOTE_ADDR not set', file '%s', line 2) | ||
| 14 | |||
| 15 | Warning: printf() has been disabled for security reasons in %s on line 2 | ||
