Skip to content

Commit

Permalink
fix(sharing): Only check path for being accessible when the storage i…
Browse files Browse the repository at this point in the history
…s a object home

Forward-ported nextcloud/server#24103

Signed-off-by: Jonas <jonas@freesources.org>

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Jul 2, 2024
1 parent a79d7bd commit 11a5a6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Share/RoomShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ private function isAccessibleResult(array $data): bool {
$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;
Expand Down

0 comments on commit 11a5a6d

Please sign in to comment.