summaryrefslogtreecommitdiff
path: root/tests/executor/eval_blacklist.phpt
diff options
context:
space:
mode:
authorBen Fuhrmannek2016-03-04 14:50:51 +0100
committerBen Fuhrmannek2016-03-04 14:50:51 +0100
commitf15b5aa308a46d555ecc09c075db8728a0895c23 (patch)
tree9c67754998d93aa922176c557df85b07fe9d857f /tests/executor/eval_blacklist.phpt
parentc46f6fdffade1aa4f544adc871650d3e1e360454 (diff)
test cases for eval+func black/whitelist
Diffstat (limited to 'tests/executor/eval_blacklist.phpt')
-rw-r--r--tests/executor/eval_blacklist.phpt18
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..8d47564
--- /dev/null
+++ b/tests/executor/eval_blacklist.phpt
@@ -0,0 +1,18 @@
1--TEST--
2Testing: suhosin.executor.eval.blacklist=max
3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?>
5--INI--
6suhosin.log.sapi=64
7suhosin.executor.disable_eval=0
8suhosin.executor.eval.blacklist=max
9--FILE--
10<?php
11 eval('abs(1);
12 max(1,2);
13 abs(1);');
14?>
15--EXPECTF--
16ALERT - eval'd function blacklisted: max() (attacker 'REMOTE_ADDR not set', file '%s', line 2)
17
18Warning: max() has been disabled for security reasons in %s : eval()'d code on line 2