Skip to content

Commit

Permalink
defensive check for sid for SLO
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Feb 16, 2016
1 parent edfa6af commit 5c2a480
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public ActionResult Signout()
public void OidcSignOut(string sid)
{
var cp = (ClaimsPrincipal)User;
var sidClaim = cp.Claims.First(x => x.Type == "sid").Value;
if (sidClaim == sid)
var sidClaim = cp.FindFirst("sid");
if (sidClaim != null && sidClaim.Value == sid)
{
Request.GetOwinContext().Authentication.SignOut("Cookies");
}
Expand Down

0 comments on commit 5c2a480

Please sign in to comment.