diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-07-05 23:19:30 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-07-08 12:36:07 +0200 |
commit | 039f730700115f4595e8f12cca175af1ae630c51 (patch) | |
tree | 8c48696f26b51d46eb5cf9d8695b9d3f0d5e6ce7 /apps | |
parent | 4de7476f584051ecb017071a3c37d84eea87a6e2 (diff) | |
download | nextcloud-server-039f730700115f4595e8f12cca175af1ae630c51.tar.gz nextcloud-server-039f730700115f4595e8f12cca175af1ae630c51.zip |
handle errors while getting fileinfo
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/ajax/shareinfo.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php index 002d7ab275e..0b93e3d2ee9 100644 --- a/apps/files_sharing/ajax/shareinfo.php +++ b/apps/files_sharing/ajax/shareinfo.php @@ -71,7 +71,7 @@ $shareManager = \OC::$server->getShareManager(); $share = $shareManager->getShareByToken($token); $sharePermissions= (int)$share->getPermissions(); -if(!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) { +if($rootInfo === false || !($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) { OCP\JSON::error(array('data' => 'Share is not readable.')); exit(); } |