From 90e37b59cce7e07a4aee3a5bbc9a00b10aaa58a6 Mon Sep 17 00:00:00 2001 From: "al.kravchuk" Date: Mon, 25 Jun 2018 17:28:57 +0300 Subject: [PATCH 1/2] magento/magento2#?: Login with wishlist raise report after logout. - fix error message after login with wishlist; - fix possibility to logout after login with wishlist; --- app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php index b7b462b3cc317..641a91d2e6554 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php @@ -45,7 +45,7 @@ public function aroundExecute(FlushFormKey $subject, callable $proceed, ...$args $currentFormKey = $this->dataFormKey->getFormKey(); $proceed(...$args); $beforeParams = $this->session->getBeforeRequestParams(); - if ($beforeParams['form_key'] == $currentFormKey) { + if (isset($beforeParams['form_key']) && $beforeParams['form_key'] == $currentFormKey) { $beforeParams['form_key'] = $this->dataFormKey->getFormKey(); $this->session->setBeforeRequestParams($beforeParams); } From 4ffb8415a3bed677493087bf83435d658962cfaf Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Tue, 26 Jun 2018 09:16:35 +0300 Subject: [PATCH 2/2] Strict comparison for form_key --- app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php index 641a91d2e6554..2d000ccfb4b93 100644 --- a/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php +++ b/app/code/Magento/Customer/Model/Plugin/CustomerFlushFormKey.php @@ -45,7 +45,7 @@ public function aroundExecute(FlushFormKey $subject, callable $proceed, ...$args $currentFormKey = $this->dataFormKey->getFormKey(); $proceed(...$args); $beforeParams = $this->session->getBeforeRequestParams(); - if (isset($beforeParams['form_key']) && $beforeParams['form_key'] == $currentFormKey) { + if (isset($beforeParams['form_key']) && $beforeParams['form_key'] === $currentFormKey) { $beforeParams['form_key'] = $this->dataFormKey->getFormKey(); $this->session->setBeforeRequestParams($beforeParams); }