Check if file source exists before searching for link
This commit is contained in:
parent
8990855f88
commit
756b514fee
|
@ -6,9 +6,8 @@ if (isset($_GET['file'])) {
|
||||||
$uidOwner = substr($_GET['file'], 1, $pos - 1);
|
$uidOwner = substr($_GET['file'], 1, $pos - 1);
|
||||||
if (OCP\User::userExists($uidOwner)) {
|
if (OCP\User::userExists($uidOwner)) {
|
||||||
OC_Util::setupFS($uidOwner);
|
OC_Util::setupFS($uidOwner);
|
||||||
$file = substr($_GET['file'], $pos);
|
|
||||||
$fileSource = OC_Filecache::getId($_GET['file'], '');
|
$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'])) {
|
if (isset($linkItem['share_with'])) {
|
||||||
// Check password
|
// Check password
|
||||||
if (isset($_POST['password'])) {
|
if (isset($_POST['password'])) {
|
||||||
|
|
Loading…
Reference in New Issue