diff options
Diffstat (limited to 'tests/executor/disable_emod_on.phpt')
| -rw-r--r-- | tests/executor/disable_emod_on.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/executor/disable_emod_on.phpt b/tests/executor/disable_emod_on.phpt new file mode 100644 index 0000000..6daf82f --- /dev/null +++ b/tests/executor/disable_emod_on.phpt | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | --TEST-- | ||
| 2 | Testing: suhosin.executor.disable_emodifier=1 | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php include "../skipifnotcli.inc"; ?> | ||
| 5 | --INI-- | ||
| 6 | suhosin.log.sapi=64 | ||
| 7 | suhosin.executor.disable_emodifier=1 | ||
| 8 | --FILE-- | ||
| 9 | <?php | ||
| 10 | $text = "HALLO"; | ||
| 11 | var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text)); | ||
| 12 | $text = "HalLO"; | ||
| 13 | var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text)); | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | string(5) "HALLO" | ||
| 17 | ALERT - use of preg_replace() with /e modifier is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '%s', line 5) | ||
| 18 | |||
| 19 | Fatal error: SUHOSIN - Use of preg_replace() with /e modifier is forbidden by configuration in %s(5) : regexp code on line 5 | ||
