From 852601dd1663239ba5907382308cb12897afa37c Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sat, 15 Feb 2014 18:09:01 +0100 Subject: Add tests for suhosin.executor.allow_symlink --- tests/executor/allow_symlink_off.phpt | 21 +++++++++++++++++++++ tests/executor/allow_symlink_on.phpt | 22 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 tests/executor/allow_symlink_off.phpt create mode 100644 tests/executor/allow_symlink_on.phpt (limited to 'tests/executor') diff --git a/tests/executor/allow_symlink_off.phpt b/tests/executor/allow_symlink_off.phpt new file mode 100644 index 0000000..782d818 --- /dev/null +++ b/tests/executor/allow_symlink_off.phpt @@ -0,0 +1,21 @@ +--TEST-- +suhosin.executor.allow_symlink=Off +--SKIPIF-- + +--INI-- +error_reporting=E_ALL +open_basedir= +suhosin.log.stdout=255 +suhosin.log.script=0 +suhosin.log.syslog=0 +suhosin.log.sapi=0 +suhosin.executor.allow_symlink=Off +--FILE-- + +--EXPECTF-- +Warning: symlink() expects exactly 2 parameters, 0 given in %s on line 2 +ALERT - symlink called during open_basedir (attacker 'REMOTE_ADDR not set', file '%s', line 4) diff --git a/tests/executor/allow_symlink_on.phpt b/tests/executor/allow_symlink_on.phpt new file mode 100644 index 0000000..dbf902c --- /dev/null +++ b/tests/executor/allow_symlink_on.phpt @@ -0,0 +1,22 @@ +--TEST-- +suhosin.executor.allow_symlink=On +--SKIPIF-- + +--INI-- +error_reporting=E_ALL +open_basedir= +suhosin.log.stdout=255 +suhosin.log.script=0 +suhosin.log.syslog=0 +suhosin.log.sapi=0 +suhosin.executor.allow_symlink=On +--FILE-- + +--EXPECTF-- +Warning: symlink() expects exactly 2 parameters, 0 given in %s on line 2 + +Warning: symlink() expects exactly 2 parameters, 0 given in %s on line 4 -- cgit v1.3