summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-02 10:26:06 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-02 10:26:06 +0100
commite60b217156aa0f2e037a3f9e23c8314e05cfbbd1 (patch)
tree94b05af345c3b847bb2222f8a2efbb7ad3ee23ed /lib
parent9861a7f6ccde73ad551a1d75b36baed3f9edf530 (diff)
parente3b5639fc19067e19191f21e9773eb9c1affc35d (diff)
downloadnextcloud-server-e60b217156aa0f2e037a3f9e23c8314e05cfbbd1.tar.gz
nextcloud-server-e60b217156aa0f2e037a3f9e23c8314e05cfbbd1.zip
Merge pull request #22015 from owncloud/share-no-permissions
Block shares that dont have the correct source permissions
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/view.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index d4cc24ae0f5..2656e34cddf 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -46,6 +46,7 @@ use Icewind\Streams\CallbackWrapper;
use OC\Files\Mount\MoveableMount;
use OC\Files\Storage\Storage;
use OC\User\User;
+use OCP\Constants;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\FileNameTooLongException;
use OCP\Files\InvalidCharacterInPathException;
@@ -1335,7 +1336,7 @@ class View {
$data = $this->getCacheEntry($storage, $internalPath, $directory);
- if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
+ if (!$data instanceof ICacheEntry || !isset($data['fileid']) || !($data->getPermissions() && Constants::PERMISSION_READ)) {
return [];
}
@@ -1385,7 +1386,7 @@ class View {
$rootEntry = $subCache->get('');
}
- if ($rootEntry) {
+ if ($rootEntry && ($rootEntry->getPermissions() && Constants::PERMISSION_READ)) {
$relativePath = trim(substr($mountPoint, $dirLength), '/');
if ($pos = strpos($relativePath, '/')) {
//mountpoint inside subfolder add size to the correct folder