summaryrefslogtreecommitdiff
path: root/tests/executor/eval_blacklist_printf.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/executor/eval_blacklist_printf.phpt')
-rw-r--r--tests/executor/eval_blacklist_printf.phpt16
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..b66d457
--- /dev/null
+++ b/tests/executor/eval_blacklist_printf.phpt
@@ -0,0 +1,16 @@
1--TEST--
2Testing: suhosin.executor.eval.blacklist=printf via call_user_func
3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?>
5--INI--
6suhosin.log.sapi=64
7suhosin.executor.disable_eval=0
8suhosin.executor.eval.blacklist=printf
9--FILE--
10<?php
11 eval('call_user_func("printf", "hello\n");');
12?>
13--EXPECTF--
14ALERT - eval'd function blacklisted: printf() (attacker 'REMOTE_ADDR not set', file '%s : eval()'d code', line 1)
15
16Warning: printf() has been disabled for security reasons in %s : eval()'d code on line 1