Merge pull request #12544 from nextcloud/fix/better_update_share_handling

Handle permission in update of share better
This commit is contained in:
Roeland Jago Douma 2018-11-20 16:19:11 +01:00 committed by GitHub
commit 1bf742c462
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -808,6 +808,10 @@ class ShareAPIController extends OCSController {
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist'));
}
if ($share->getShareOwner() !== $this->currentUser && $share->getSharedBy() !== $this->currentUser) {
throw new OCSForbiddenException('You are not allowed to edit incomming shares');
}
if ($permissions === null &&
$password === null &&
$sendPasswordByTalk === null &&