From 44e73724f63ba49e9b813d835d930142232389d6 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Mon, 14 Aug 2006 16:19:33 +0000 Subject: [PATCH] 2006-08-14 Gonzalo Paniagua Javier * FormsAuthentication.cs: set the Secure attribute of the authentication cookie when required. svn path=/trunk/mcs/; revision=63729 --- mcs/class/System.Web/System.Web.Security/ChangeLog | 7 ++++++- .../System.Web/System.Web.Security/FormsAuthentication.cs | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Security/ChangeLog b/mcs/class/System.Web/System.Web.Security/ChangeLog index fb482b54769..3350f111c96 100644 --- a/mcs/class/System.Web/System.Web.Security/ChangeLog +++ b/mcs/class/System.Web/System.Web.Security/ChangeLog @@ -1,6 +1,11 @@ +2006-08-14 Gonzalo Paniagua Javier + + * FormsAuthentication.cs: set the Secure attribute of the authentication + cookie when required. + 2006-07-06 Konstantin Triger - * FormsAuthentication.cs: Ensure initialized, fix url mapping. + * FormsAuthentication.cs: Ensure initialized, fix url mapping. 2006-05-03 Chris Toshok diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs index 885fd93615a..08c4ab587d6 100644 --- a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs +++ b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs @@ -304,7 +304,10 @@ namespace System.Web.Security if (!createPersistentCookie) then = DateTime.MinValue; - return new HttpCookie (cookieName, Encrypt (ticket), strCookiePath, then); + HttpCookie cookie = new HttpCookie (cookieName, Encrypt (ticket), strCookiePath, then); + if (requireSSL) + cookie.Secure = true; + return cookie; } public static string GetRedirectUrl (string userName, bool createPersistentCookie) -- 2.25.1