Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(sharing): fix json decoding the list of groups excluded from sharing
json_decode() returns stdclass by default instead of an associative object, which can't be used for
array_diff or array_intersect later

Signed-off-by: Thomas Citharel <[email protected]>
  • Loading branch information
tcitworld authored and backportbot[bot] committed Aug 24, 2025
commit bfd0458e86b4b39eddf78e7c211689b6cb12bd23
2 changes: 1 addition & 1 deletion lib/private/Share20/ShareDisableChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function sharingDisabledForUser(?string $userId) {

if ($excludeGroups && $excludeGroups !== 'no') {
$groupsList = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
$excludedGroups = json_decode($groupsList);
$excludedGroups = json_decode($groupsList, true);
if (is_null($excludedGroups)) {
$excludedGroups = explode(',', $groupsList);
$newValue = json_encode($excludedGroups);
Expand Down
Loading