From 93c14b77e9d283985952a4804946f4bae1195437 Mon Sep 17 00:00:00 2001 From: robvde Date: Tue, 17 Jul 2012 21:34:44 +0400 Subject: [PATCH] http://websitepanel.codeplex.com/workitem/286 Was caused when recyclying the enterprise server. Encrypted session get got a lenght of 24 which resulted into a loop and finally a 500 error. When encrypted sessionid does not match, session is logged off and redirected to default page and encrypted session key restored. --- .../WebsitePanel.WebPortal/Code/SecureSessionModule.cs | 4 ++++ .../ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs index 580b5cd5..5c3087e8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs @@ -72,6 +72,8 @@ namespace WebsitePanel.WebPortal { FormsAuthentication.SignOut(); HttpContext.Current.Response.Redirect(DefaultPage.GetPageUrl(PortalConfiguration.SiteSettings["DefaultPage"])); + cookie.Value = GetSessionIDMac(cookie.Value, request.UserHostAddress, request.UserAgent, _ValidationKey); + return; } // Separate the session ID and the MAC @@ -87,6 +89,8 @@ namespace WebsitePanel.WebPortal { FormsAuthentication.SignOut(); HttpContext.Current.Response.Redirect(DefaultPage.GetPageUrl(PortalConfiguration.SiteSettings["DefaultPage"])); + cookie.Value = GetSessionIDMac(cookie.Value, request.UserHostAddress, request.UserAgent, _ValidationKey); + } // Strip the MAC from the cookie before ASP.NET sees it diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs index 77ca867b..17f6f552 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs @@ -35,7 +35,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls { private string mailboxPlanToSelect; - private bool addNone; public string MailboxPlanId {