mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
only set compromised flag if counter is > 0
This commit is contained in:
@ -174,7 +174,10 @@ namespace Bit.Core.Identity
|
||||
// Update database
|
||||
await _u2fRepository.DeleteManyByUserIdAsync(user.Id);
|
||||
key.Counter = registration.Counter;
|
||||
if(key.Counter > 0)
|
||||
{
|
||||
key.Compromised = registration.IsCompromised;
|
||||
}
|
||||
|
||||
var providers = user.GetTwoFactorProviders();
|
||||
providers[TwoFactorProviderType.U2f].MetaData["Key1"] = key;
|
||||
|
Reference in New Issue
Block a user