File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
lib/internal/Magento/Framework Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -514,11 +514,6 @@ protected function getParameters($value)
514
514
$ tokenizer ->setString ($ value );
515
515
$ params = $ tokenizer ->tokenize ();
516
516
foreach ($ params as $ key => $ value ) {
517
- $ validKey = strtolower ($ key );
518
- if (strcmp ($ key , $ validKey )) {
519
- $ params [$ validKey ] = $ value ;
520
- unset($ params [$ key ]);
521
- }
522
517
if ($ value !== null && substr ($ value , 0 , 1 ) === '$ ' ) {
523
518
$ params [$ key ] = $ this ->getVariable (substr ($ value , 1 ), null );
524
519
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function tokenize()
25
25
}
26
26
27
27
if ($ this ->char () !== '= ' ) {
28
- $ parameterName .= $ this ->char ();
28
+ $ parameterName .= strtolower ( $ this ->char () );
29
29
} else {
30
30
$ parameters [$ parameterName ] = $ this ->getValue ();
31
31
$ parameterName = '' ;
Original file line number Diff line number Diff line change @@ -1043,10 +1043,18 @@ public function getCacheKeyInfo()
1043
1043
* Get Key for caching block content
1044
1044
*
1045
1045
* @return string
1046
+ * @throws \Magento\Framework\Exception\LocalizedException
1046
1047
*/
1047
1048
public function getCacheKey ()
1048
1049
{
1049
1050
if ($ this ->hasData ('cache_key ' )) {
1051
+ if (preg_match ('/[^a-z0-9]/i ' , $ this ->getData ('cache_key ' ))) {
1052
+ throw new \Magento \Framework \Exception \LocalizedException (
1053
+ __ (
1054
+ 'Please enter cache key with only alphanumeric characters. '
1055
+ )
1056
+ );
1057
+ }
1050
1058
return static ::CUSTOM_CACHE_KEY_PREFIX . $ this ->getData ('cache_key ' );
1051
1059
}
1052
1060
You can’t perform that action at this time.
0 commit comments