NullReferenceException bug in OpenID fixed
This commit is contained in:
@@ -247,10 +247,14 @@ namespace Owin.Security.Providers.OpenID
|
||||
{
|
||||
nameValue = lastValue;
|
||||
}
|
||||
else
|
||||
else if (!string.IsNullOrEmpty(emailValue) && emailValue.Contains("@"))
|
||||
{
|
||||
nameValue = emailValue.Substring(0, emailValue.IndexOf('@'));
|
||||
}
|
||||
else
|
||||
{
|
||||
nameValue = claimedID;
|
||||
}
|
||||
}
|
||||
|
||||
identity.AddClaim(new Claim(ClaimTypes.Name, nameValue, "http://www.w3.org/2001/XMLSchema#string", Options.AuthenticationType));
|
||||
|
||||
Reference in New Issue
Block a user