diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-02-22 13:39:10 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-03-06 10:18:16 +0100 |
commit | 875d0a27b0f11d0a4027bc1d5f7eae1afcd8aa59 (patch) | |
tree | 00e2e1df6d27e5c69669e89a1b01b3f4379ba1f4 /apps/user_ldap | |
parent | dc6782554127af6bcaecfc08d767b662d268d078 (diff) | |
download | nextcloud-server-875d0a27b0f11d0a4027bc1d5f7eae1afcd8aa59.tar.gz nextcloud-server-875d0a27b0f11d0a4027bc1d5f7eae1afcd8aa59.zip |
fix(user_ldap): Ignore unserialize error in group membership migration
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>
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 { |