diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-13 15:09:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 15:09:24 +0100 |
commit | db9e1b90f92cb0ad31aa443e2e4cbe6f4e10d8e4 (patch) | |
tree | 4399d8b4bc7276ea12cd6601859fcaff844b3227 /lib | |
parent | 846fa89045928493c512c50d07182e78c131234f (diff) | |
parent | b71bc1289b997eddde8f843c805324692c262007 (diff) | |
download | nextcloud-server-db9e1b90f92cb0ad31aa443e2e4cbe6f4e10d8e4.tar.gz nextcloud-server-db9e1b90f92cb0ad31aa443e2e4cbe6f4e10d8e4.zip |
Merge pull request #12375 from nextcloud/backport/12284/stable14
[14] Properly search the root of a shared external storage
Diffstat (limited to 'lib')
-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 75df45e257b..57f58e7d839 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -94,7 +94,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() . '/'); } /** |