Fail fast if authenticator key is null (#14037)
This commit is contained in:
parent
4fd9d383d9
commit
fe62ce7ce0
|
|
@ -48,7 +48,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
{
|
{
|
||||||
var key = await manager.GetAuthenticatorKeyAsync(user);
|
var key = await manager.GetAuthenticatorKeyAsync(user);
|
||||||
int code;
|
int code;
|
||||||
if (!int.TryParse(token, out code))
|
if (key == null || !int.TryParse(token, out code))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue