-
-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
322 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cookie/Samesite.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
class Mage_Adminhtml_Model_System_Config_Source_Cookie_Samesite | ||
{ | ||
/** | ||
* @return array[] | ||
*/ | ||
public function toOptionArray(): array | ||
{ | ||
return [ | ||
['value' => 'None', 'label' => Mage::helper('adminhtml')->__('None')], | ||
['value' => 'Strict', 'label' => Mage::helper('adminhtml')->__('Strict')], | ||
['value' => 'Lax', 'label' => Mage::helper('adminhtml')->__('Lax')] | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
class Mage_Core_Helper_Security | ||
{ | ||
|
||
private $invalidBlockActions | ||
= [ | ||
// explicitly not using class constant here Mage_Page_Block_Html_Topmenu_Renderer::class | ||
// if the class does not exists it breaks. | ||
['block' => Mage_Page_Block_Html_Topmenu_Renderer::class, 'method' => 'render'], | ||
['block' => Mage_Core_Block_Template::class, 'method' => 'fetchView'], | ||
]; | ||
|
||
/** | ||
* @param Mage_Core_Block_Abstract $block | ||
* @param string $method | ||
* @param string[] $args | ||
* | ||
* @throws Mage_Core_Exception | ||
*/ | ||
public function validateAgainstBlockMethodBlacklist(Mage_Core_Block_Abstract $block, $method, array $args) | ||
{ | ||
foreach ($this->invalidBlockActions as $action) { | ||
if ($block instanceof $action['block'] && strtolower($action['method']) === strtolower($method)) { | ||
Mage::throwException( | ||
sprintf('Action with combination block %s and method %s is forbidden.', get_class($block), $method) | ||
); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.