diff options
author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-08-11 15:29:06 +0000 |
---|---|---|
committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-08-11 15:29:06 +0000 |
commit | 0ea8978235047c3d3f7eb423e0136911be196f98 (patch) | |
tree | b8da9ed02de16179fb664f6bbac3b8ba3b0e514c /tests/security/open_basedir_symlink.phpt | |
parent | e279aa07fe723ab285397de0c0f49d968f7fb6d7 (diff) | |
download | php-git-0ea8978235047c3d3f7eb423e0136911be196f98.tar.gz |
Check the relevant path for open_basedir in symlink()
Diffstat (limited to 'tests/security/open_basedir_symlink.phpt')
-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 ab87e87b04..799e9e4c8a 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,4 +80,7 @@ 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] *** |