fix(totp): new user can properly use totp

This commit is contained in:
Hivert Quentin
2026-03-19 13:30:28 +01:00
parent 7f7e1ad496
commit 623f083cd9

View File

@@ -418,7 +418,8 @@ static const NSString *kJwtKey = @"jwt";
}
else
{
if ([us dictionaryForKey: @"General"] && ![[us dictionaryForKey: @"General"] objectForKey: @"PrivateSalt"])
if ([us dictionaryForKey: @"General"] && !([[us dictionaryForKey: @"General"] objectForKey: @"PrivateSalt"] ||
[[us dictionaryForKey: @"General"] objectForKey: @"totpKey"]))
{
// Since v5.3.0, a new salt is used for TOTP. If it's missing, disable TOTP and alert the user.
[ud setTotpEnabled: NO];