aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php3
-rw-r--r--lib/private/share/share.php10
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index ef5bfc59f65..d6b7f53408f 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -423,6 +423,9 @@ class Encryption extends Wrapper {
* @return bool
*/
public function moveFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = true) {
+ if ($sourceStorage === $this) {
+ return $this->rename($sourceInternalPath, $targetInternalPath);
+ }
// TODO clean this up once the underlying moveFromStorage in OC\Files\Storage\Wrapper\Common is fixed:
// - call $this->storage->moveFromStorage() instead of $this->copyBetweenStorage
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 5a11d1de66e..97c36a03c86 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1909,6 +1909,12 @@ class Share extends Constants {
$items = array_merge($items, $collectionItems);
}
+ // filter out invalid items, these can appear when subshare entries exist
+ // for a group in which the requested user isn't a member any more
+ $items = array_filter($items, function($item) {
+ return $item['share_type'] !== self::$shareTypeGroupUserUnique;
+ });
+
return self::formatResult($items, $column, $backend, $format, $parameters);
} elseif ($includeCollections && $collectionTypes && in_array('folder', $collectionTypes)) {
// FIXME: Thats a dirty hack to improve file sharing performance,
@@ -1990,6 +1996,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)) {
@@ -2071,7 +2079,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'];