diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-02-22 13:39:10 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-03-06 12:05:32 +0000 |
commit | 17173d37628e92ab0b9c9362293fcebd1c45e8f3 (patch) | |
tree | 26e341293ec58819e43b5ffd3899df0c95666b1a /apps/user_ldap/lib/Migration | |
parent | 9ca98c16048c94f33c561e0a2fa73de5ae1e82cf (diff) | |
download | nextcloud-server-17173d37628e92ab0b9c9362293fcebd1c45e8f3.tar.gz nextcloud-server-17173d37628e92ab0b9c9362293fcebd1c45e8f3.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/lib/Migration')
-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 71fdb536b1a..8e4c92598da 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 { |