From ff4edc6ecf463211c6527879d6b23f991fd5b73b Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Mon, 6 Oct 2014 17:36:23 +0200 Subject: restructured error output in unittests. (issues #52 + #54) --- tests/logging/use_x_forwarded_for_off.phpt | 12 ++++++++---- tests/logging/use_x_forwarded_for_off_no_remote_addr.phpt | 12 ++++++++---- tests/logging/use_x_forwarded_for_on.phpt | 12 ++++++++---- tests/logging/use_x_forwarded_for_on_no_x_forwarded.phpt | 12 ++++++++---- 4 files changed, 32 insertions(+), 16 deletions(-) (limited to 'tests/logging') 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 --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=Off +suhosin.simulation=1 --ENV-- return << --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker '101.102.103.104', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-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) --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=Off +suhosin.simulation=1 --FILE-- --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker 'REMOTE_ADDR not set', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-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 --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=On +suhosin.simulation=1 --ENV-- return << --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker '1.2.3.4', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-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) --SKIPIF-- --INI-- +suhosin.log.syslog=0 suhosin.log.sapi=0 -suhosin.log.stdout=255 suhosin.log.script=0 -suhosin.log.syslog=0 +suhosin.log.file=255 +suhosin.log.file.time=0 +suhosin.log.file.name={PWD}/suhosintest.$$.log.tmp +auto_append_file={PWD}/suhosintest.$$.log.tmp suhosin.executor.func.blacklist=max suhosin.log.use-x-forwarded-for=On +suhosin.simulation=1 --FILE-- --EXPECTF-- -Warning: max() has been disabled for security reasons in %s on line 2 -ALERT - function within blacklist called: max() (attacker 'X-FORWARDED-FOR not set', file '%s', line 2) \ No newline at end of file +Warning: SIMULATION - max() has been disabled for security reasons in %s on line 2 +ALERT-SIMULATION - function within blacklist called: max() (attacker 'X-FORWARDED-FOR not set', file '%s', line 2) \ No newline at end of file -- cgit v1.3