Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bueno <david@evicertia.com>2019-10-09 21:50:46 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-10-09 21:50:46 +0300
commit7df7ceb6d30ebf2a9e4856f155839906c0c64797 (patch)
treedfc272d5bf25c60c1dff4b68484b464b51fdda9e /mcs/class/System.Web
parent30886f997fa4fbcd7e7cc585dfd2109941f139c4 (diff)
[System.Web] Now IsExpired property for FormsAuthenticationTicket compares two dates with same kind (UTC) to avoid unexpected results (#17162)
Fixes #17161
Diffstat (limited to 'mcs/class/System.Web')
-rw-r--r--mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs
index 5adad7863bb..344288430fb 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationTicket.cs
@@ -187,7 +187,7 @@ namespace System.Web.Security
}
public bool Expired {
- get { return DateTime.Now > expiration; }
+ get { return DateTime.UtcNow > expiration.ToUniversalTime(); }
}
public bool IsPersistent {