summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/DefaultShareProvider.php
diff options
context:
space:
mode:
authorAndrius <andrius.kulbis@ktu.lt>2017-03-09 14:36:20 +0200
committerGitHub <noreply@github.com>2017-03-09 14:36:20 +0200
commit708b62f223a7b791455d6d1231fe913d39c82560 (patch)
tree2cf7060e8cc4375b237e74dbf17289020f31d56a /lib/private/Share20/DefaultShareProvider.php
parent6d10a2aece9ab4cce0f57f20594b9fcb9372a794 (diff)
downloadnextcloud-server-708b62f223a7b791455d6d1231fe913d39c82560.tar.gz
nextcloud-server-708b62f223a7b791455d6d1231fe913d39c82560.zip
Fix detecting deleted shares in object store
While using the object store, the shares, that are moved to trashbin were still detected as accessible and cause broken shares to be shown in file/folder listing.
Diffstat (limited to 'lib/private/Share20/DefaultShareProvider.php')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 23e8db34d7f..fe6472c31a0 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -642,7 +642,8 @@ class DefaultShareProvider implements IShareProvider {
// exclude shares leading to trashbin on home storages
$pathSections = explode('/', $data['path'], 2);
// FIXME: would not detect rare md5'd home storage case properly
- if ($pathSections[0] !== 'files' && explode(':', $data['storage_string_id'], 2)[0] === 'home') {
+ if ($pathSections[0] !== 'files'
+ && in_array(explode(':', $data['storage_string_id'], 2)[0], array('home', 'object'))) {
return false;
}
return true;