From 49d68f067120adf7731dae07ec8fd01e41b8382f Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 2 Nov 2019 14:52:00 +1100 Subject: [PATCH] Cookies are no longer serialized Based on update to library https://github.com/octobercms/library/commit/09e859a13ee5663ee6cb6f0c02a4a97e09deefa7 we no longer serialize cookies, so the decrypter no longer needs to apply a serialization layer --- modules/backend/widgets/Lists.php | 2 ++ modules/cms/classes/Controller.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 17d45631f..c4bfd4f43 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -1172,6 +1172,7 @@ class Lists extends WidgetBase /** * Process as text, escape the value + * @return string */ protected function evalTextTypeValue($record, $column, $value) { @@ -1188,6 +1189,7 @@ class Lists extends WidgetBase /** * Process as number, proxy to text + * @return string */ protected function evalNumberTypeValue($record, $column, $value) { diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index ab7d57ad4..594e6f5a5 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -1657,7 +1657,7 @@ class Controller $token = Request::input('_token') ?: Request::header('X-CSRF-TOKEN'); if (!$token && $header = Request::header('X-XSRF-TOKEN')) { - $token = Crypt::decrypt($header); + $token = Crypt::decrypt($header, false); } if (!strlen($token) || !strlen(Session::token())) {