patches fix for #U4-2214

This commit is contained in:
Shannon Deminick
2013-05-12 21:12:55 -10:00
parent 6f26f7b57c
commit ea9653fa83

View File

@@ -261,9 +261,17 @@ namespace umbraco.BasePages
return encTicket.DecryptWithMachineKey();
}
}
catch (HttpException ex)
catch (Exception ex)
{
// we swallow this type of exception as it happens if a legacy (pre 4.8.1) cookie is set
if (ex is ArgumentException || ex is FormatException || ex is HttpException)
{
StateHelper.Cookies.UserContext.Clear();
}
else
{
throw;
}
}
}
return "";