Only check path for being accessible when the storage is a object home

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-11-13 13:48:32 +01:00
parent 10aa22dd45
commit d665981447
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 1 additions and 1 deletions

View File

@ -824,7 +824,7 @@ class DefaultShareProvider implements IShareProvider {
$pathSections = explode('/', $data['path'], 2);
// FIXME: would not detect rare md5'd home storage case properly
if ($pathSections[0] !== 'files'
&& in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) {
&& (strpos($data['storage_string_id'], 'home::') === 0 || strpos($data['storage_string_id'], 'object::user') === 0)) {
return false;
}
return true;