diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-29 20:40:12 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-29 21:12:23 -0400 |
commit | 756b514fee05bdeb9c7fc06876e498837974bb6c (patch) | |
tree | 2a4cff5e3bd39101cc6f010368568a1c01c236a6 /apps/files_sharing | |
parent | 8990855f88c8cf0803bcf7220699c54b46b0d546 (diff) | |
download | nextcloud-server-756b514fee05bdeb9c7fc06876e498837974bb6c.tar.gz nextcloud-server-756b514fee05bdeb9c7fc06876e498837974bb6c.zip |
Check if file source exists before searching for link
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/public.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 7f72ef81bd3..010f6b9de18 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -6,9 +6,8 @@ if (isset($_GET['file'])) { $uidOwner = substr($_GET['file'], 1, $pos - 1); if (OCP\User::userExists($uidOwner)) { OC_Util::setupFS($uidOwner); - $file = substr($_GET['file'], $pos); $fileSource = OC_Filecache::getId($_GET['file'], ''); - if ($linkItem = OCP\Share::getItemSharedWithByLink('file', $fileSource, $uidOwner)) { + if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink('file', $fileSource, $uidOwner))) { if (isset($linkItem['share_with'])) { // Check password if (isset($_POST['password'])) { |