diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-08-10 11:35:38 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-08-10 11:35:38 +0200 |
commit | 6f3d9ec0243d241fe407c019427117de51e3c5be (patch) | |
tree | 3b3406bfaa6e841b76f621263087bee40b9beea1 /lib | |
parent | 9dca963283b2708c353d3a48f6b4907210500575 (diff) | |
download | nextcloud-server-6f3d9ec0243d241fe407c019427117de51e3c5be.tar.gz nextcloud-server-6f3d9ec0243d241fe407c019427117de51e3c5be.zip |
getJailedPath expects to have a trailing /
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/wrapper/cachejail.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files/cache/wrapper/cachejail.php b/lib/private/files/cache/wrapper/cachejail.php index b889ace5c7d..82f62eb7fba 100644 --- a/lib/private/files/cache/wrapper/cachejail.php +++ b/lib/private/files/cache/wrapper/cachejail.php @@ -58,6 +58,11 @@ class CacheJail extends CacheWrapper { * @return null|string the jailed path or null if the path is outside the jail */ protected function getJailedPath($path) { + + if ($this->root === '') { + return $path; + } + $rootLength = strlen($this->root) + 1; if ($path === $this->root) { return ''; |