From 8de0773214e9217d30b480609187127358c61e5a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 2 Oct 2015 13:07:20 +0200 Subject: Make sure the share we found is for the same item --- lib/private/share/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private') diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 32389f34868..b22b4b6a2ed 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -2070,7 +2070,7 @@ class Share extends Constants { $userShareType = ($isGroupShare) ? self::$shareTypeGroupUserUnique : $shareType; - if ($sourceExists) { + if ($sourceExists && $sourceExists['item_source'] === $itemSource) { $fileTarget = $sourceExists['file_target']; $itemTarget = $sourceExists['item_target']; -- cgit v1.2.3 From 3bbb65998fed43728f3e67822d81a289a8886e17 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 5 Oct 2015 12:03:36 +0200 Subject: Make sure all variables are defined --- lib/private/share/share.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/private') diff --git a/lib/private/share/share.php b/lib/private/share/share.php index b22b4b6a2ed..42fec03d3ae 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1989,6 +1989,8 @@ class Share extends Constants { $queriesToExecute = array(); $suggestedItemTarget = null; + $groupFileTarget = $fileTarget = $suggestedFileTarget = $filePath = ''; + $groupItemTarget = $itemTarget = $fileSource = $parent = 0; $result = self::checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate); if(!empty($result)) { -- cgit v1.2.3