Return the proper jailed path when requesting the root path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
d810883587
commit
bb70d1096a
|
@ -65,7 +65,7 @@ class Jail extends Wrapper {
|
|||
public function getJailedPath($path) {
|
||||
$root = rtrim($this->rootPath, '/') . '/';
|
||||
|
||||
if (strpos($path, $root) !== 0) {
|
||||
if ($path !== $this->rootPath && strpos($path, $root) !== 0) {
|
||||
return null;
|
||||
} else {
|
||||
$path = substr($path, strlen($this->rootPath));
|
||||
|
|
Loading…
Reference in New Issue