summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-09-03 22:56:28 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-09-06 17:10:21 +0200
commitd7931b82ae2d17ab8ea5ae5d43f23ea622c13bc6 (patch)
tree57412f4908e1a9138971aa5dc67c06da184ece8e /apps/files_sharing/lib
parentbf630e46f62c8ab6ec37f5d169cb2b75711028df (diff)
downloadnextcloud-server-d7931b82ae2d17ab8ea5ae5d43f23ea622c13bc6.tar.gz
nextcloud-server-d7931b82ae2d17ab8ea5ae5d43f23ea622c13bc6.zip
Check the permission of the underlying storage
Else shares might expose more permissions than the storage actually providers. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index 2d2f14fc554..77019e25265 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -195,7 +195,8 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
if (!$this->isValid()) {
return 0;
}
- $permissions = $this->superShare->getPermissions();
+ $permissions = parent::getPermissions($target) & $this->superShare->getPermissions();
+
// part files and the mount point always have delete permissions
if ($target === '' || pathinfo($target, PATHINFO_EXTENSION) === 'part') {
$permissions |= \OCP\Constants::PERMISSION_DELETE;