diff --git a/src/umbraco.businesslogic/BasePages/BasePage.cs b/src/umbraco.businesslogic/BasePages/BasePage.cs index 25c0d5e0ec..25a09f9b25 100644 --- a/src/umbraco.businesslogic/BasePages/BasePage.cs +++ b/src/umbraco.businesslogic/BasePages/BasePage.cs @@ -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 "";