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 <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc authored and backportbot[bot] committed Mar 6, 2024
1 parent 9ca98c1 commit 17173d3
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 17173d3

Please sign in to comment.