summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-09-05 19:14:24 +0200
committerGitHub <noreply@github.com>2023-09-05 19:14:24 +0200
commit278f79f932f645ced72ae995b98b9ecb237b4c88 (patch)
tree4a0e6ac459b47e2d2045d329739cce51cfe1745f /lib
parentc7d6320fbfb7b8ca0dde20bd9848aa02d482beeb (diff)
parentd60f95833bb3afc4838f71950d4a023710c236f7 (diff)
downloadnextcloud-server-278f79f932f645ced72ae995b98b9ecb237b4c88.tar.gz
nextcloud-server-278f79f932f645ced72ae995b98b9ecb237b4c88.zip
Merge pull request #40227 from nextcloud/backport/40195/stable27
[stable27] fix: prevent sharing permissions on user root folder
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Node/LazyUserFolder.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Node/LazyUserFolder.php b/lib/private/Files/Node/LazyUserFolder.php
index 8fbdec4b49d..7093f5ebd8f 100644
--- a/lib/private/Files/Node/LazyUserFolder.php
+++ b/lib/private/Files/Node/LazyUserFolder.php
@@ -63,7 +63,8 @@ class LazyUserFolder extends LazyFolder {
}
}, [
'path' => $this->path,
- 'permissions' => Constants::PERMISSION_ALL,
+ // Sharing user root folder is not allowed
+ 'permissions' => Constants::PERMISSION_ALL ^ Constants::PERMISSION_SHARE,
'type' => FileInfo::TYPE_FOLDER,
'mimetype' => FileInfo::MIMETYPE_FOLDER,
]);