From a5fcddc0a8d306218c54e4cafcc99c6754d22089 Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 7 Mar 2016 15:59:34 -0800 Subject: [PATCH] #704 unregister auth handlers during unwind. --- .../AuthenticationMiddleware.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Authentication/AuthenticationMiddleware.cs b/src/Microsoft.AspNetCore.Authentication/AuthenticationMiddleware.cs index ad63b17614..a01490c3e4 100644 --- a/src/Microsoft.AspNetCore.Authentication/AuthenticationMiddleware.cs +++ b/src/Microsoft.AspNetCore.Authentication/AuthenticationMiddleware.cs @@ -73,7 +73,7 @@ namespace Microsoft.AspNetCore.Authentication await _next(context); } } - catch (Exception) + finally { try { @@ -81,9 +81,8 @@ namespace Microsoft.AspNetCore.Authentication } catch (Exception) { - // Don't mask the original exception + // Don't mask the original exception, if any } - throw; } }