From 2bf085a8d27a5b9a05a0164fcc0c1ea41e78c601 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sun, 16 Feb 2014 10:15:45 +0100 Subject: Tests for suhosin.executor.include.allow_writable_files --- .../include/include_allow_writable_files_off.phpt | 31 ++++++++++++++++++++++ tests/include/include_allow_writable_files_on.phpt | 29 ++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 tests/include/include_allow_writable_files_off.phpt create mode 100644 tests/include/include_allow_writable_files_on.phpt (limited to 'tests') diff --git a/tests/include/include_allow_writable_files_off.phpt b/tests/include/include_allow_writable_files_off.phpt new file mode 100644 index 0000000..3fb9e89 --- /dev/null +++ b/tests/include/include_allow_writable_files_off.phpt @@ -0,0 +1,31 @@ +--TEST-- +Testing suhosin.executor.include.allow_writable_files=Off +--DESCRIPTION-- +Because the test file itself is writable the whole test case is not executed!!! +--SKIPIF-- + +--INI-- +suhosin.log.syslog=0 +suhosin.log.sapi=255 +suhosin.log.script=0 +suhosin.log.phpscript=0 +suhosin.executor.include.whitelist= +suhosin.executor.include.blacklist= +suhosin.executor.include.allow_writable_files=Off +--FILE-- + +--EXPECTF-- +ALERT - Include filename ('%s') is writable by PHP process (attacker 'REMOTE_ADDR not set', file '%s') diff --git a/tests/include/include_allow_writable_files_on.phpt b/tests/include/include_allow_writable_files_on.phpt new file mode 100644 index 0000000..8770699 --- /dev/null +++ b/tests/include/include_allow_writable_files_on.phpt @@ -0,0 +1,29 @@ +--TEST-- +Testing suhosin.executor.include.allow_writable_files=On +--SKIPIF-- + +--INI-- +suhosin.log.syslog=0 +suhosin.log.sapi=255 +suhosin.log.script=0 +suhosin.log.phpscript=0 +suhosin.executor.include.whitelist= +suhosin.executor.include.blacklist= +suhosin.executor.include.allow_writable_files=On +--FILE-- + +--EXPECTF-- +AAAA +BBBB -- cgit v1.3