From 22794e9c8fc514abc61878bc5268d5ebe15d61f8 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Tue, 8 Feb 2011 19:12:28 -0500 Subject: [PATCH] Just need 1 instance of the generic principal. --- .../System.Web.Security/DefaultAuthenticationModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Security/DefaultAuthenticationModule.cs b/mcs/class/System.Web/System.Web.Security/DefaultAuthenticationModule.cs index ba58d6bca46..c2cf4b9cb9d 100644 --- a/mcs/class/System.Web/System.Web.Security/DefaultAuthenticationModule.cs +++ b/mcs/class/System.Web/System.Web.Security/DefaultAuthenticationModule.cs @@ -41,7 +41,7 @@ namespace System.Web.Security public sealed class DefaultAuthenticationModule : IHttpModule { static readonly object authenticateEvent = new object (); - static GenericIdentity defaultIdentity = new GenericIdentity ("", ""); + static IPrincipal generic_principal = new GenericPrincipal (new GenericIdentity ("", ""), new string [0]); EventHandlerList events = new EventHandlerList (); @@ -74,7 +74,7 @@ namespace System.Web.Security eh (this, new DefaultAuthenticationEventArgs (context)); if (context.User == null) - context.User = new GenericPrincipal (defaultIdentity, new string [0]); + context.User = generic_principal; Thread.CurrentPrincipal = context.User; } -- 2.25.1