From 0b2969a89ad3dfc1772d7dc7b051c70bd8e325e5 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Tue, 5 Jul 2016 15:14:24 +0200 Subject: [PATCH] PT-6190 - Fix CSRF check --- Controllers/Backend/SwagImportExportCron.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Controllers/Backend/SwagImportExportCron.php b/Controllers/Backend/SwagImportExportCron.php index d1adf6ef..616950c2 100644 --- a/Controllers/Backend/SwagImportExportCron.php +++ b/Controllers/Backend/SwagImportExportCron.php @@ -28,6 +28,7 @@ use Shopware\Components\SwagImportExport\Utils\CommandHelper; use Shopware\CustomModels\ImportExport\Profile; use Shopware\Models\Media\Album; +use \Shopware\Components\CSRFWhitelistAware; /** * Shopware ImportExport Plugin @@ -35,13 +36,23 @@ * @category Shopware * @copyright Copyright (c) shopware AG (http://www.shopware.de) */ -class Shopware_Controllers_Backend_SwagImportExportCron extends Shopware_Controllers_Backend_ExtJs +class Shopware_Controllers_Backend_SwagImportExportCron extends Shopware_Controllers_Backend_ExtJs implements CSRFWhitelistAware { /** * @var ModelManager */ protected $manager; + /** + * @inheritdoc + */ + public function getWhitelistedCSRFActions() + { + return [ + 'cron' + ]; + } + public function init() { Shopware()->Plugins()->Backend()->Auth()->setNoAuth();