summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-07-05 23:19:30 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-07-08 12:36:07 +0200
commit039f730700115f4595e8f12cca175af1ae630c51 (patch)
tree8c48696f26b51d46eb5cf9d8695b9d3f0d5e6ce7 /apps
parent4de7476f584051ecb017071a3c37d84eea87a6e2 (diff)
downloadnextcloud-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.php2
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();
}