diff options
author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-08-11 15:30:44 +0000 |
---|---|---|
committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-08-11 15:30:44 +0000 |
commit | de24949cce44c870139d35833c51b50a73e71231 (patch) | |
tree | 10d47929cbc91161814eb08d922743056d2d4398 /tests/security | |
parent | ba7cfd2fa77a1bddd6d4363d95fe2fa70b4c60d3 (diff) | |
download | php-git-de24949cce44c870139d35833c51b50a73e71231.tar.gz |
MFH: Check the relevant path for open_basedir in symlink()
Diffstat (limited to 'tests/security')
-rw-r--r-- | tests/security/open_basedir_symlink.phpt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/security/open_basedir_symlink.phpt b/tests/security/open_basedir_symlink.phpt index 3b3f1d571f..3aaa07b820 100644 --- a/tests/security/open_basedir_symlink.phpt +++ b/tests/security/open_basedir_symlink.phpt @@ -31,6 +31,12 @@ $target = ($directory."/test/ok/ok.txt"); var_dump(symlink($target, $symlink)); var_dump(unlink($symlink)); + +var_dump(mkdir("ok2")); +$symlink = ($directory."/test/ok/ok2/ok.txt"); +var_dump(symlink("../ok.txt", $symlink)); // $target == (dirname($symlink)."/".$target) == ($directory."/test/ok/ok.txt"); +var_dump(unlink($symlink)); + test_open_basedir_after("symlink"); ?> --CLEAN-- @@ -74,5 +80,8 @@ Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad) is not bool(false) bool(true) bool(true) +bool(true) +bool(true) +bool(true) *** Finished testing open_basedir configuration [symlink] *** |