diff options
| author | Ben Fuhrmannek | 2016-03-04 14:57:02 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2016-03-04 14:57:02 +0100 |
| commit | 1ac3a99cf162b34bdf8fd01e5aa90438374cc14f (patch) | |
| tree | 6f1a1a20b1ee759d5731cfd42df40d3dd48c0f94 /tests/executor | |
| parent | f15b5aa308a46d555ecc09c075db8728a0895c23 (diff) | |
test for suhosin.executor.max_depth
Diffstat (limited to 'tests/executor')
| -rw-r--r-- | tests/executor/recursion_maxdepth.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/executor/recursion_maxdepth.phpt b/tests/executor/recursion_maxdepth.phpt new file mode 100644 index 0000000..ba3ccf0 --- /dev/null +++ b/tests/executor/recursion_maxdepth.phpt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing: suhosin.executor.max_depth | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifnotcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.sapi=64 | ||
| 7 | suhosin.executor.max_depth=13 | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | function rec($level) | ||
| 11 | { | ||
| 12 | echo $level,"\n"; | ||
| 13 | rec(++$level); | ||
| 14 | } | ||
| 15 | |||
| 16 | rec(2); | ||
| 17 | ?> | ||
| 18 | --EXPECTF-- | ||
| 19 | 2 | ||
| 20 | 3 | ||
| 21 | 4 | ||
| 22 | 5 | ||
| 23 | 6 | ||
| 24 | 7 | ||
| 25 | 8 | ||
| 26 | 9 | ||
| 27 | 10 | ||
| 28 | 11 | ||
| 29 | 12 | ||
| 30 | 13 | ||
| 31 | ALERT - maximum execution depth reached - script terminated (attacker 'REMOTE_ADDR not set', file '%s', line 4) | ||
