mirror of
https://github.com/bitwarden/server
synced 2025-12-20 18:23:44 +00:00
use fixed-time comparison of secrets (#1698)
This commit is contained in:
@@ -893,7 +893,7 @@ namespace Bit.Core.Services
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.Compare(user.TwoFactorRecoveryCode, recoveryCode, true) != 0)
|
||||
if (!CoreHelpers.FixedTimeEquals(user.TwoFactorRecoveryCode, recoveryCode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user