diff options
| author | Stefan Esser | 2014-02-15 18:09:01 +0100 |
|---|---|---|
| committer | Stefan Esser | 2014-02-15 18:09:01 +0100 |
| commit | 852601dd1663239ba5907382308cb12897afa37c (patch) | |
| tree | a9535560313fb6f6bc7cec146094d730be793524 /tests/executor/allow_symlink_off.phpt | |
| parent | 13d2a1cbba22ead86f54f1764ca4f87857059803 (diff) | |
Add tests for suhosin.executor.allow_symlink
Diffstat (limited to 'tests/executor/allow_symlink_off.phpt')
| -rw-r--r-- | tests/executor/allow_symlink_off.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
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 @@ | |||
| 1 | --TEST-- | ||
| 2 | suhosin.executor.allow_symlink=Off | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!function_exists("memory_get_usage")) print "skip PHP not compiled with memory_limit support"; ?> | ||
| 5 | --INI-- | ||
| 6 | error_reporting=E_ALL | ||
| 7 | open_basedir= | ||
| 8 | suhosin.log.stdout=255 | ||
| 9 | suhosin.log.script=0 | ||
| 10 | suhosin.log.syslog=0 | ||
| 11 | suhosin.log.sapi=0 | ||
| 12 | suhosin.executor.allow_symlink=Off | ||
| 13 | --FILE-- | ||
| 14 | <?php | ||
| 15 | symlink(); | ||
| 16 | ini_set("open_basedir", "."); | ||
| 17 | symlink(); | ||
| 18 | ?> | ||
| 19 | --EXPECTF-- | ||
| 20 | Warning: symlink() expects exactly 2 parameters, 0 given in %s on line 2 | ||
| 21 | ALERT - symlink called during open_basedir (attacker 'REMOTE_ADDR not set', file '%s', line 4) | ||
