Skip to content

Commit 56b4b23

Browse files
committed
AC-6049: Filtering inputs handler in page_cache/block controller
* allowing handles to start with numbers
1 parent b8e5eec commit 56b4b23

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ abstract class Block extends \Magento\Framework\App\Action\Action
4949
/**
5050
* Validation pattern for handles array
5151
*/
52-
private const VALIDATION_RULE_PATTERN = '/^[a-z]+[a-z0-9_]*$/i';
52+
private const VALIDATION_RULE_PATTERN = '/^[a-z0-9]+[a-z0-9_]*$/i';
5353

5454
/**
5555
* @param \Magento\Framework\App\Action\Context $context

app/code/Magento/PageCache/Test/Unit/Controller/Block/EsiTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class EsiTest extends TestCase
6969
/**
7070
* Validation pattern for handles array
7171
*/
72-
private const VALIDATION_RULE_PATTERN = '/^[a-z]+[a-z0-9_]*$/i';
72+
private const VALIDATION_RULE_PATTERN = '/^[a-z0-9]+[a-z0-9_]*$/i';
7373

7474
/**
7575
* Set up before test

app/code/Magento/PageCache/Test/Unit/Controller/Block/RenderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class RenderTest extends TestCase
7474
/**
7575
* Validation pattern for handles array
7676
*/
77-
private const VALIDATION_RULE_PATTERN = '/^[a-z]+[a-z0-9_]*$/i';
77+
private const VALIDATION_RULE_PATTERN = '/^[a-z0-9]+[a-z0-9_]*$/i';
7878

7979
/**
8080
* @inheritDoc

0 commit comments

Comments
 (0)