mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
add null check
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user