summaryrefslogtreecommitdiff
path: root/src/tests/eval_whitelist.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eval_whitelist.phpt')
-rw-r--r--src/tests/eval_whitelist.phpt28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/tests/eval_whitelist.phpt b/src/tests/eval_whitelist.phpt
deleted file mode 100644
index a602d0d..0000000
--- a/src/tests/eval_whitelist.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
1--TEST--
2Eval whitelist
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/eval_whitelist.ini
7--FILE--
8<?php
9function my_fun($p) {
10 return "my_fun: $p";
11}
12
13function my_other_fun($p) {
14 return "my_other_fun: $p";
15}
16
17$a = my_fun("1337 1337 1337");
18echo "Outside of eval: $a\n";
19eval('$a = my_fun("1234");');
20echo "After allowed eval: $a\n";
21eval('$a = my_other_fun("1234");');
22echo "After eval: $a\n";
23?>
24--EXPECTF--
25Outside of eval: my_fun: 1337 1337 1337
26After allowed eval: my_fun: 1234
27
28Fatal error: [snuffleupagus][Eval_whitelist] The function 'my_other_fun' isn't in the eval whitelist, dropping its call. in %a/eval_whitelist.php on line 7 \ No newline at end of file