Author: gonzalo
Date: 2005-12-21 23:08:01 -0500 (Wed, 21 Dec 2005)
New Revision: 54717
Modified:
trunk/mcs/class/System.Web/System.Web.Security/ChangeLog
trunk/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
Log:
2005-12-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* FormsAuthenticationModule.cs: expire the cookie. Fixes bug #77043.
Patch by Cyrille Colin.
Modified: trunk/mcs/class/System.Web/System.Web.Security/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Security/ChangeLog 2005-12-22
03:26:28 UTC (rev 54716)
+++ trunk/mcs/class/System.Web/System.Web.Security/ChangeLog 2005-12-22
04:08:01 UTC (rev 54717)
@@ -1,3 +1,8 @@
+2005-12-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * FormsAuthenticationModule.cs: expire the cookie. Fixes bug #77043.
+ Patch by Cyrille Colin.
+
2005-12-13 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* FormsAuthenticationModule.cs: ignore any exception thrown when mapping
Modified:
trunk/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
2005-12-22 03:26:28 UTC (rev 54716)
+++ trunk/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
2005-12-22 04:08:01 UTC (rev 54717)
@@ -114,11 +114,15 @@
if (ticket == null || (ticket.IsPersistent &&
ticket.Expired))
return;
+ FormsAuthenticationTicket oldticket = ticket;
if (slidingExpiration)
ticket = FormsAuthentication.RenewTicketIfOld
(ticket);
context.User = new GenericPrincipal (new FormsIdentity
(ticket), new string [0]);
+ if (cookie.Expires == DateTime.MinValue && oldticket ==
ticket)
+ return;
+
cookie.Value = FormsAuthentication.Encrypt (ticket);
cookie.Path = cookiePath;
if (ticket.IsPersistent)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches