summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Esser2014-02-11 16:44:43 +0100
committerStefan Esser2014-02-11 16:44:43 +0100
commit65c1c61cc3360337a58ea0359dc48f45127ca2d6 (patch)
treefa64fda914357ad0aefbf7430b6babb3a01106a9
parent6f3ba2395df8eebcb26f8064192d0e5297adcdbc (diff)
Fix some tests
-rw-r--r--tests/executor/disable_emod_off.phpt14
-rw-r--r--tests/executor/disable_emod_on.phpt17
-rw-r--r--tests/executor/disable_eval_on.phpt2
3 files changed, 22 insertions, 11 deletions
diff --git a/tests/executor/disable_emod_off.phpt b/tests/executor/disable_emod_off.phpt
index 3c9cb01..65908f9 100644
--- a/tests/executor/disable_emod_off.phpt
+++ b/tests/executor/disable_emod_off.phpt
@@ -3,14 +3,20 @@ Testing: suhosin.executor.disable_emodifier=0
3--SKIPIF-- 3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?> 4<?php include "../skipifnotcli.inc"; ?>
5--INI-- 5--INI--
6error_reporting=E_ALL&~E_DEPRECATED
6suhosin.log.sapi=64 7suhosin.log.sapi=64
7suhosin.executor.disable_emodifier=0 8suhosin.executor.disable_emodifier=0
8--FILE-- 9--FILE--
9<?php 10<?php
10 $text = "HALLO"; 11
11 var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text)); 12 function doit()
12 $text = "HalLO"; 13 {
13 var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text)); 14 $text = "HALLO";
15 var_dump(@preg_replace('/[a-z]/e', "strtoupper('\\0')", $text));
16 $text = "HalLO";
17 var_dump(@preg_replace('/[a-z]/e', "strtoupper('\\0')", $text));
18 }
19 doit();
14?> 20?>
15--EXPECTF-- 21--EXPECTF--
16string(5) "HALLO" 22string(5) "HALLO"
diff --git a/tests/executor/disable_emod_on.phpt b/tests/executor/disable_emod_on.phpt
index 6daf82f..0f26d65 100644
--- a/tests/executor/disable_emod_on.phpt
+++ b/tests/executor/disable_emod_on.phpt
@@ -3,17 +3,22 @@ Testing: suhosin.executor.disable_emodifier=1
3--SKIPIF-- 3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?> 4<?php include "../skipifnotcli.inc"; ?>
5--INI-- 5--INI--
6error_reporting=E_ALL&~E_DEPRECATED
6suhosin.log.sapi=64 7suhosin.log.sapi=64
7suhosin.executor.disable_emodifier=1 8suhosin.executor.disable_emodifier=1
8--FILE-- 9--FILE--
9<?php 10<?php
10 $text = "HALLO"; 11 function doit()
11 var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text)); 12 {
12 $text = "HalLO"; 13 $text = "HALLO";
13 var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text)); 14 var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text));
15 $text = "HalLO";
16 var_dump(preg_replace('/[a-z]/e', "strtoupper('\\0')", $text));
17 }
18 doit();
14?> 19?>
15--EXPECTF-- 20--EXPECTF--
16string(5) "HALLO" 21string(5) "HALLO"
17ALERT - use of preg_replace() with /e modifier is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '%s', line 5) 22ALERT - use of preg_replace() with /e modifier is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '%s', line 7)
18 23
19Fatal error: SUHOSIN - Use of preg_replace() with /e modifier is forbidden by configuration in %s(5) : regexp code on line 5 24Fatal error: SUHOSIN - Use of preg_replace() with /e modifier is forbidden by configuration in %s(7) : regexp code on line %d
diff --git a/tests/executor/disable_eval_on.phpt b/tests/executor/disable_eval_on.phpt
index 49f4936..83cd9b4 100644
--- a/tests/executor/disable_eval_on.phpt
+++ b/tests/executor/disable_eval_on.phpt
@@ -14,4 +14,4 @@ suhosin.executor.disable_eval=1
14--EXPECTF-- 14--EXPECTF--
15ALERT - use of eval is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '%s', line 3) 15ALERT - use of eval is forbidden by configuration (attacker 'REMOTE_ADDR not set', file '%s', line 3)
16 16
17Fatal error: SUHOSIN - Use of eval is forbidden by configuration in %s(3) : eval()'d code on line 3 17Fatal error: SUHOSIN - Use of eval is forbidden by configuration in %s(3) : eval()'d code on line %d