Updates to login cookies
This commit is contained in:
@@ -234,6 +234,12 @@ namespace umbraco.BasePages
|
||||
{
|
||||
// we swallow this type of exception as it happens if a legacy (pre 4.8.1) cookie is set
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
// we swallow this one because it's 99.99% certaincy is legacy based. We'll still log it, though
|
||||
Log.Instance.AddException(ex);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
@@ -354,6 +354,8 @@ namespace umbraco.BusinessLogic
|
||||
public void SetValue(string value)
|
||||
{
|
||||
HttpCookie cookie = new HttpCookie(_key, value);
|
||||
if (GlobalSettings.UseSSL)
|
||||
cookie.Secure = true;
|
||||
if (!TimeSpan.Zero.Equals(_expires))
|
||||
cookie.Expires = DateTime.Now + _expires;
|
||||
ResponseCookie = cookie;
|
||||
@@ -378,7 +380,9 @@ namespace umbraco.BusinessLogic
|
||||
public void SetValue(string value, DateTime expires)
|
||||
{
|
||||
HttpCookie cookie = new HttpCookie(_key, value);
|
||||
cookie.Expires = expires;
|
||||
if (GlobalSettings.UseSSL)
|
||||
cookie.Secure = true;
|
||||
cookie.Expires = expires;
|
||||
ResponseCookie = cookie;
|
||||
|
||||
// original Umbraco code also does this
|
||||
|
||||
Reference in New Issue
Block a user