summaryrefslogtreecommitdiff
path: root/tests/logging
diff options
context:
space:
mode:
authorBen Fuhrmannek2014-10-06 17:36:23 +0200
committerBen Fuhrmannek2014-10-06 17:36:23 +0200
commitff4edc6ecf463211c6527879d6b23f991fd5b73b (patch)
treed926fa666c778b5b422b5d7aaa18f516fa6f2abb /tests/logging
parentdef06bc8331efe49ad3a3768da7800f60459c390 (diff)
restructured error output in unittests. (issues #52 + #54)
Diffstat (limited to 'tests/logging')
-rw-r--r--tests/logging/use_x_forwarded_for_off.phpt12
-rw-r--r--tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt12
-rw-r--r--tests/logging/use_x_forwarded_for_on.phpt12
-rw-r--r--tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt12
4 files changed, 32 insertions, 16 deletions
diff --git a/tests/logging/use_x_forwarded_for_off.phpt b/tests/logging/use_x_forwarded_for_off.phpt
index 6b31d53..2820523 100644
--- a/tests/logging/use_x_forwarded_for_off.phpt
+++ b/tests/logging/use_x_forwarded_for_off.phpt
@@ -3,12 +3,16 @@ Testing: suhosin.log.use-x-forwarded-for=Off
3--SKIPIF-- 3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?> 4<?php include "../skipifnotcli.inc"; ?>
5--INI-- 5--INI--
6suhosin.log.syslog=0
6suhosin.log.sapi=0 7suhosin.log.sapi=0
7suhosin.log.stdout=255
8suhosin.log.script=0 8suhosin.log.script=0
9suhosin.log.syslog=0 9suhosin.log.file=255
10suhosin.log.file.time=0
11suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp
12auto_append_file={PWD}/suhosintest.$$.log.tmp
10suhosin.executor.func.blacklist=max 13suhosin.executor.func.blacklist=max
11suhosin.log.use-x-forwarded-for=Off 14suhosin.log.use-x-forwarded-for=Off
15suhosin.simulation=1
12--ENV-- 16--ENV--
13return <<<END 17return <<<END
14REMOTE_ADDR=101.102.103.104 18REMOTE_ADDR=101.102.103.104
@@ -19,5 +23,5 @@ END;
19 max(1,2); 23 max(1,2);
20?> 24?>
21--EXPECTF-- 25--EXPECTF--
22Warning: max() has been disabled for security reasons in %s on line 2 26Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2
23ALERT - function within blacklist called: max() (attacker '101.102.103.104', file '%s', line 2) \ No newline at end of file 27ALERT-SIMULATION - function within blacklist called: max() (attacker '101.102.103.104', file '%s', line 2) \ No newline at end of file
diff --git a/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt b/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt
index bd4c72b..1a30e81 100644
--- a/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt
+++ b/tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt
@@ -3,16 +3,20 @@ Testing: suhosin.log.use-x-forwarded-for=Off (without REMOTE_ADDR set)
3--SKIPIF-- 3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?> 4<?php include "../skipifnotcli.inc"; ?>
5--INI-- 5--INI--
6suhosin.log.syslog=0
6suhosin.log.sapi=0 7suhosin.log.sapi=0
7suhosin.log.stdout=255
8suhosin.log.script=0 8suhosin.log.script=0
9suhosin.log.syslog=0 9suhosin.log.file=255
10suhosin.log.file.time=0
11suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp
12auto_append_file={PWD}/suhosintest.$$.log.tmp
10suhosin.executor.func.blacklist=max 13suhosin.executor.func.blacklist=max
11suhosin.log.use-x-forwarded-for=Off 14suhosin.log.use-x-forwarded-for=Off
15suhosin.simulation=1
12--FILE-- 16--FILE--
13<?php 17<?php
14 max(1,2); 18 max(1,2);
15?> 19?>
16--EXPECTF-- 20--EXPECTF--
17Warning: max() has been disabled for security reasons in %s on line 2 21Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2
18ALERT - function within blacklist called: max() (attacker 'REMOTE_ADDR not set', file '%s', line 2) \ No newline at end of file 22ALERT-SIMULATION - function within blacklist called: max() (attacker 'REMOTE_ADDR not set', file '%s', line 2) \ No newline at end of file
diff --git a/tests/logging/use_x_forwarded_for_on.phpt b/tests/logging/use_x_forwarded_for_on.phpt
index 5f37ca9..e476ba7 100644
--- a/tests/logging/use_x_forwarded_for_on.phpt
+++ b/tests/logging/use_x_forwarded_for_on.phpt
@@ -3,12 +3,16 @@ Testing: suhosin.log.use-x-forwarded-for=On
3--SKIPIF-- 3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?> 4<?php include "../skipifnotcli.inc"; ?>
5--INI-- 5--INI--
6suhosin.log.syslog=0
6suhosin.log.sapi=0 7suhosin.log.sapi=0
7suhosin.log.stdout=255
8suhosin.log.script=0 8suhosin.log.script=0
9suhosin.log.syslog=0 9suhosin.log.file=255
10suhosin.log.file.time=0
11suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp
12auto_append_file={PWD}/suhosintest.$$.log.tmp
10suhosin.executor.func.blacklist=max 13suhosin.executor.func.blacklist=max
11suhosin.log.use-x-forwarded-for=On 14suhosin.log.use-x-forwarded-for=On
15suhosin.simulation=1
12--ENV-- 16--ENV--
13return <<<END 17return <<<END
14REMOTE_ADDR=101.102.103.104 18REMOTE_ADDR=101.102.103.104
@@ -19,5 +23,5 @@ END;
19 max(1,2); 23 max(1,2);
20?> 24?>
21--EXPECTF-- 25--EXPECTF--
22Warning: max() has been disabled for security reasons in %s on line 2 26Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2
23ALERT - function within blacklist called: max() (attacker '1.2.3.4', file '%s', line 2) \ No newline at end of file 27ALERT-SIMULATION - function within blacklist called: max() (attacker '1.2.3.4', file '%s', line 2) \ No newline at end of file
diff --git a/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt b/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt
index aea6e06..b3e26de 100644
--- a/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt
+++ b/tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt
@@ -3,16 +3,20 @@ Testing: suhosin.log.use-x-forwarded-for=On (without X-Forwarded-For set)
3--SKIPIF-- 3--SKIPIF--
4<?php include "../skipifnotcli.inc"; ?> 4<?php include "../skipifnotcli.inc"; ?>
5--INI-- 5--INI--
6suhosin.log.syslog=0
6suhosin.log.sapi=0 7suhosin.log.sapi=0
7suhosin.log.stdout=255
8suhosin.log.script=0 8suhosin.log.script=0
9suhosin.log.syslog=0 9suhosin.log.file=255
10suhosin.log.file.time=0
11suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp
12auto_append_file={PWD}/suhosintest.$$.log.tmp
10suhosin.executor.func.blacklist=max 13suhosin.executor.func.blacklist=max
11suhosin.log.use-x-forwarded-for=On 14suhosin.log.use-x-forwarded-for=On
15suhosin.simulation=1
12--FILE-- 16--FILE--
13<?php 17<?php
14 max(1,2); 18 max(1,2);
15?> 19?>
16--EXPECTF-- 20--EXPECTF--
17Warning: max() has been disabled for security reasons in %s on line 2 21Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2
18ALERT - function within blacklist called: max() (attacker 'X-FORWARDED-FOR not set', file '%s', line 2) \ No newline at end of file 22ALERT-SIMULATION - function within blacklist called: max() (attacker 'X-FORWARDED-FOR not set', file '%s', line 2) \ No newline at end of file