From 48744e0b6c9b9775d78850d67639c37aca3a83cc Mon Sep 17 00:00:00 2001 From: Thilo Molitor Date: Tue, 17 Dec 2024 05:23:27 +0100 Subject: [PATCH] Fix password migration to not enable accounts without password --- Monal/Classes/PasswordMigration.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Monal/Classes/PasswordMigration.swift b/Monal/Classes/PasswordMigration.swift index 83f7819225..7ee63a30d7 100644 --- a/Monal/Classes/PasswordMigration.swift +++ b/Monal/Classes/PasswordMigration.swift @@ -94,7 +94,7 @@ struct PasswordMigration: View { ToolbarItem(placement: .navigationBarTrailing) { HStack{ Button(action: { - DDLogInfo("Saving migrated accounts: \(String(describing:self.needingMigration))") + DDLogInfo("Saving migrated accounts...") for id in self.needingMigration.keys { var dic = self.needingMigration[id]! //don't show this migration dialog again, even if the user did not activate this account @@ -108,6 +108,8 @@ struct PasswordMigration: View { MLXMPPManager.sharedInstance().connectAccount(dic["account_id"] as! NSNumber) } } else { + //make sure to never enable accounts without password + dic["enabled"] = NSNumber(value:false) DDLogDebug("Updating account in DB: enabled=\(String(describing:dic["enabled"])), needs_password_migration=\(String(describing:dic["needs_password_migration"])), password.count=0") DataLayer.sharedInstance().updateAccoun(with:dic) }