From dbfb72cf608d392af56ef5f46471aa15c4b82bf6 Mon Sep 17 00:00:00 2001 From: Hailong Zhao Date: Mon, 23 Nov 2020 23:24:13 -0500 Subject: [PATCH] Fix the compatibility issue with Magento 2.3.x --- Api/Controller/Auctane/Index.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) mode change 100755 => 100644 Api/Controller/Auctane/Index.php diff --git a/Api/Controller/Auctane/Index.php b/Api/Controller/Auctane/Index.php old mode 100755 new mode 100644 index 29a5d52..cd30eb8 --- a/Api/Controller/Auctane/Index.php +++ b/Api/Controller/Auctane/Index.php @@ -10,10 +10,13 @@ use Magento\Backend\Model\View\Result\RedirectFactory; use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; +use Magento\Framework\App\CsrfAwareActionInterface; +use Magento\Framework\App\Request\InvalidRequestException; +use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\StoreManagerInterface; -class Index extends Action +class Index extends Action implements CsrfAwareActionInterface { /** * @var StoreManagerInterface @@ -65,6 +68,23 @@ public function __construct( $this->redirectFactory = $redirectFactory; } + /** + * @inheritDoc + */ + public function createCsrfValidationException( + RequestInterface $request + ): ?InvalidRequestException { + return null; + } + + /** + * @inheritDoc + */ + public function validateForCsrf(RequestInterface $request): ?bool + { + return true; + } + /** * Default function *