mirror of
https://github.com/bitwarden/server.git
synced 2025-05-22 20:11:04 -05:00
add null check
This commit is contained in:
parent
52758e5749
commit
d10d25afea
@ -331,8 +331,8 @@ namespace Bit.Core.IdentityServer
|
|||||||
var tokens = token?.Split('|');
|
var tokens = token?.Split('|');
|
||||||
return new Dictionary<string, object>
|
return new Dictionary<string, object>
|
||||||
{
|
{
|
||||||
["Challenge"] = tokens.Length > 0 ? tokens[0] : null,
|
["Challenge"] = tokens != null && tokens.Length > 0 ? tokens[0] : null,
|
||||||
["Challenges"] = tokens.Length > 1 ? tokens[1] : null
|
["Challenges"] = tokens != null && tokens.Length > 1 ? tokens[1] : null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if(type == TwoFactorProviderType.Email)
|
else if(type == TwoFactorProviderType.Email)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user