Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-04-06 15:46:38 +02:00
parent ae7205f550
commit 5e69f98c16
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
2 changed files with 13 additions and 24 deletions

View File

@ -201,18 +201,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
!is_null($propFind->getStatus(self::SHAREES_PROPERTYNAME))
)
) {
try {
$folderNode = $sabreNode->getNode();
} catch (NotFoundException $e) {
// If the folder can't be properly found just return
return;
}
if (!($folderNode instanceof Folder)) {
// Safety check
return;
}
$folderNode = $sabreNode->getNode();
$this->cachedFolders[] = $sabreNode->getPath();
$childShares = $this->getSharesFolder($folderNode);
foreach ($childShares as $id => $shares) {

View File

@ -1449,21 +1449,21 @@ class View {
$cache = $storage->getCache($internalPath);
$user = \OC_User::getUser();
if (!$directoryInfo) {
$data = $this->getCacheEntry($storage, $internalPath, $directory);
if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
return [];
}
} else {
$data = $directoryInfo;
}
if (!($data->getPermissions() & Constants::PERMISSION_READ)) {
if (!$directoryInfo) {
$data = $this->getCacheEntry($storage, $internalPath, $directory);
if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
return [];
}
} else {
$data = $directoryInfo;
}
$folderId = $data->getId();
$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
if (!($data->getPermissions() & Constants::PERMISSION_READ)) {
return [];
}
$folderId = $data->getId();
$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
$sharingDisabled = \OCP\Util::isSharingDisabledForUser();