Skip to content

Commit 9ad9c9a

Browse files
committed
AC-6049: Filtering inputs handler in page_cache/block controller
* Static test fixes
1 parent 46756f3 commit 9ad9c9a

File tree

1 file changed

+6
-3
lines changed
  • app/code/Magento/PageCache/Controller

1 file changed

+6
-3
lines changed

app/code/Magento/PageCache/Controller/Block.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ abstract class Block extends \Magento\Framework\App\Action\Action
5858
* @param Json $jsonSerializer
5959
* @param Base64Json $base64jsonSerializer
6060
* @param LayoutCacheKeyInterface $layoutCacheKey
61+
* @param RegexFactory|null $regexValidatorFactory
6162
*/
6263
public function __construct(
6364
\Magento\Framework\App\Action\Context $context,
6465
\Magento\Framework\Translate\InlineInterface $translateInline,
6566
Json $jsonSerializer = null,
6667
Base64Json $base64jsonSerializer = null,
67-
LayoutCacheKeyInterface $layoutCacheKey = null
68+
LayoutCacheKeyInterface $layoutCacheKey = null,
69+
?RegexFactory $regexValidatorFactory = null
6870
) {
6971
parent::__construct($context);
7072
$this->translateInline = $translateInline;
@@ -115,10 +117,11 @@ protected function _getBlocks()
115117
/**
116118
* Validates handles parameter
117119
*
118-
* @param $handles array
120+
* @param array $handles
119121
* @return bool
120122
*/
121-
private function validateHandleParam($handles): bool {
123+
private function validateHandleParam($handles): bool
124+
{
122125
$validator = $this->regexValidatorFactory->create(['pattern' => self::VALIDATION_RULE_PATTERN]);
123126
foreach ($handles as $handle) {
124127
if (!$validator->isValid($handle)) {

0 commit comments

Comments
 (0)