diff options
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 470e4c53c5c..2d27293dfd8 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -695,6 +695,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 && $publicUpload === null && $expireDate === null) { throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given')); } |