diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-03-06 13:04:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 13:04:20 +0100 |
commit | 827269f5b857a5daca09f4266445d41b327dad2b (patch) | |
tree | 0675aa039df9c8729ad660ac41f2a85a56aae07a /apps/user_ldap | |
parent | 4a2330876e6576f071924b3e1b2a63d0b7f3f672 (diff) | |
parent | 875d0a27b0f11d0a4027bc1d5f7eae1afcd8aa59 (diff) | |
download | nextcloud-server-827269f5b857a5daca09f4266445d41b327dad2b.tar.gz nextcloud-server-827269f5b857a5daca09f4266445d41b327dad2b.zip |
Merge pull request #43764 from nextcloud/fix/user_ldap-ignore-unserialize-errors-in-migration
fix(user_ldap): Ignore unserialize error in group membership migration
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Migration/Version1190Date20230706134108.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php b/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php index 4e3e44a5f21..e0740514d75 100644 --- a/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php +++ b/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php @@ -99,6 +99,10 @@ class Version1190Date20230706134108 extends SimpleMigrationStep { $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 { |