Skip to content

Commit 0b8df8c

Browse files
committed
Merge pull request #3596 in SW/shopware from sw-15029/5.2/whitelist-swagupdate-controller to 5.2
* commit '48e882a79a0122468ef05edf7966c280d1b9270a': SW-15029 - Whitelist SwagUpdate controller actions
2 parents 79cfc34 + 48e882a commit 0b8df8c

File tree

1 file changed

+14
-1
lines changed
  • engine/Shopware/Plugins/Default/Backend/SwagUpdate/Controllers/Backend

1 file changed

+14
-1
lines changed

engine/Shopware/Plugins/Default/Backend/SwagUpdate/Controllers/Backend/SwagUpdate.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424

2525
use Psr\Log\LoggerInterface;
26+
use Shopware\Components\CSRFWhitelistAware;
2627
use Shopware\Components\Random;
2728
use ShopwarePlugins\SwagUpdate\Components\Checks\EmotionTemplateCheck;
2829
use ShopwarePlugins\SwagUpdate\Components\Checks\IonCubeLoaderCheck;
@@ -47,7 +48,7 @@
4748
* @package Shopware\Controllers\Backend\SwagUpdate
4849
* @copyright Copyright (c) shopware AG (http://www.shopware.de)
4950
*/
50-
class Shopware_Controllers_Backend_SwagUpdate extends Shopware_Controllers_Backend_ExtJs
51+
class Shopware_Controllers_Backend_SwagUpdate extends Shopware_Controllers_Backend_ExtJs implements CSRFWhitelistAware
5152
{
5253
/**
5354
* Cache key for update response
@@ -576,4 +577,16 @@ private function getUserLanguage(stdClass $user)
576577

577578
return substr($locale, 0, 2);
578579
}
580+
581+
/**
582+
* Returns a list with actions which should not be validated for CSRF protection
583+
*
584+
* @return string[]
585+
*/
586+
public function getWhitelistedCSRFActions()
587+
{
588+
return [
589+
'startUpdate'
590+
];
591+
}
579592
}

0 commit comments

Comments
 (0)