1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-22 12:04:27 -05:00

add null check

This commit is contained in:
Kyle Spearrin 2018-10-13 16:06:54 -04:00
parent 52758e5749
commit d10d25afea

View File

@ -331,8 +331,8 @@ namespace Bit.Core.IdentityServer
var tokens = token?.Split('|');
return new Dictionary<string, object>
{
["Challenge"] = tokens.Length > 0 ? tokens[0] : null,
["Challenges"] = tokens.Length > 1 ? tokens[1] : null
["Challenge"] = tokens != null && tokens.Length > 0 ? tokens[0] : null,
["Challenges"] = tokens != null && tokens.Length > 1 ? tokens[1] : null
};
}
else if(type == TwoFactorProviderType.Email)