Skip to content

Commit

Permalink
fix: prevent sharing permissions on user root folder
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv authored and backportbot-nextcloud[bot] committed Sep 4, 2023
1 parent 057b65d commit c3f146b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Files/Node/LazyUserFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public function __construct(IRootFolder $rootFolder, IUser $user) {
}
}, [
'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,
]);
Expand Down

0 comments on commit c3f146b

Please sign in to comment.