Skip to content

Commit

Permalink
fix(user_ldap): Ignore unserialize error in group membership migration
Browse files Browse the repository at this point in the history
The memberships will be checked by the background job later and data
 will be added to the table anyway.

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Mar 5, 2024
1 parent ad8cb2c commit 301e23b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ protected function copyGroupMembershipData(): void {
$result = $query->executeQuery();
while ($row = $result->fetch()) {
$knownUsers = unserialize($row['owncloudusers']);
if (!is_array($knownUsers)) {
/* Unserialize failed or data was incorrect in database, ignore */
continue;
}
$knownUsers = array_unique($knownUsers);
foreach ($knownUsers as $knownUser) {
try {
Expand Down

0 comments on commit 301e23b

Please sign in to comment.