diff options
Diffstat (limited to 'apps/files_sharing/ajax/shareinfo.php')
-rw-r--r-- | apps/files_sharing/ajax/shareinfo.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php index acf58a2431a..002d7ab275e 100644 --- a/apps/files_sharing/ajax/shareinfo.php +++ b/apps/files_sharing/ajax/shareinfo.php @@ -71,6 +71,11 @@ $shareManager = \OC::$server->getShareManager(); $share = $shareManager->getShareByToken($token); $sharePermissions= (int)$share->getPermissions(); +if(!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) { + OCP\JSON::error(array('data' => 'Share is not readable.')); + exit(); +} + /** * @param \OCP\Files\FileInfo $dir * @param \OC\Files\View $view |