diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-11-13 15:59:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 15:59:01 +0100 |
commit | b89996483d340ce80dfc0eeb72aa0434083ab37c (patch) | |
tree | 1e5edd38906a8cd2cefa2b2f29fd4d0a155cd537 /lib/private | |
parent | 204466c71429b99f15649dd1e2afed60011f2168 (diff) | |
parent | 8b03bf7d5abfbafd63c77224f9aa9fe21d705e70 (diff) | |
download | nextcloud-server-b89996483d340ce80dfc0eeb72aa0434083ab37c.tar.gz nextcloud-server-b89996483d340ce80dfc0eeb72aa0434083ab37c.zip |
Merge pull request #12376 from nextcloud/backport/12284/stable13
[13] Properly search the root of a shared external storage
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 1ad00ba44c5..2e9c60bee4b 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -93,7 +93,7 @@ class CacheJail extends CacheWrapper { protected function filterCacheEntry($entry) { $rootLength = strlen($this->getRoot()) + 1; - return ($entry['path'] === $this->getRoot()) or (substr($entry['path'], 0, $rootLength) === $this->getRoot() . '/'); + return $rootLength === 1 || ($entry['path'] === $this->getRoot()) || (substr($entry['path'], 0, $rootLength) === $this->getRoot() . '/'); } /** |