mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 18:28:08 +01:00
Return the proper jailed path when requesting the root path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user