Robin Appelman
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
10 additions and
1 deletions
-
lib/private/Files/Cache/Wrapper/CacheJail.php
-
lib/private/Files/Cache/Wrapper/CacheWrapper.php
-
lib/private/Files/View.php
|
|
|
@ -92,7 +92,11 @@ class CacheJail extends CacheWrapper { |
|
|
|
|
|
|
|
protected function formatCacheEntry($entry) { |
|
|
|
if (isset($entry['path'])) { |
|
|
|
$entry['path'] = $this->getJailedPath($entry['path']); |
|
|
|
$sourcePath = $entry['path']; |
|
|
|
$entry['path'] = $this->getJailedPath($sourcePath); |
|
|
|
if (is_null($entry['path'])) { |
|
|
|
$this->logger->error("'$sourcePath' is not inside jail path {$this->root}", ['entry' => $entry]); |
|
|
|
} |
|
|
|
} |
|
|
|
return $entry; |
|
|
|
} |
|
|
|
|
|
|
|
@ -27,6 +27,7 @@ class CacheWrapper extends Cache { |
|
|
|
$this->mimetypeLoader = $cache->mimetypeLoader; |
|
|
|
$this->connection = $cache->connection; |
|
|
|
$this->querySearchHelper = $cache->querySearchHelper; |
|
|
|
$this->logger = $cache->logger; |
|
|
|
} else { |
|
|
|
if (!$dependencies) { |
|
|
|
$dependencies = Server::get(CacheDependencies::class); |
|
|
|
@ -34,6 +35,7 @@ class CacheWrapper extends Cache { |
|
|
|
$this->mimetypeLoader = $dependencies->getMimeTypeLoader(); |
|
|
|
$this->connection = $dependencies->getConnection(); |
|
|
|
$this->querySearchHelper = $dependencies->getQuerySearchHelper(); |
|
|
|
$this->logger = $dependencies->getLogger(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1527,6 +1527,9 @@ class View { |
|
|
|
if ($sharingDisabled) { |
|
|
|
$content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE; |
|
|
|
} |
|
|
|
if (is_null($content['path'])) { |
|
|
|
throw new \Exception('Directory listing of "' . $path . '" contains item with null path (' . $content['fileid'] . ')'); |
|
|
|
} |
|
|
|
$ownerId = $storage->getOwner($content['path']); |
|
|
|
if ($ownerId !== false) { |
|
|
|
$owner = $this->getUserObjectForOwner($ownerId); |
|
|
|
|