summaryrefslogtreecommitdiff
path: root/tests/executor/disable_emod_on.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/executor/disable_emod_on.phpt')
-rw-r--r--tests/executor/disable_emod_on.phpt19
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--
2Testing: suhosin.executor.disable_emodifier=1
3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?>
5--INI--
6suhosin.log.sapi=64
7suhosin.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--
16string(5) "HALLO"
17ALERT - use of preg_replace() with /e modifier is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '%s', line 5)
18
19Fatal error: SUHOSIN - Use of preg_replace() with /e modifier is forbidden by configuration in %s(5) : regexp code on line 5