Skip to content
Snippets Groups Projects
Commit 756b514f authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Check if file source exists before searching for link

parent 8990855f
No related branches found
No related tags found
No related merge requests found
......@@ -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'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment