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