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)
514514 $ tokenizer ->setString ($ value );
515515 $ params = $ tokenizer ->tokenize ();
516516 foreach ($ params as $ key => $ value ) {
517- $ validKey = strtolower ($ key );
518- if (strcmp ($ key , $ validKey )) {
519- $ params [$ validKey ] = $ value ;
520- unset($ params [$ key ]);
521- }
522517 if ($ value !== null && substr ($ value , 0 , 1 ) === '$ ' ) {
523518 $ params [$ key ] = $ this ->getVariable (substr ($ value , 1 ), null );
524519 }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function tokenize()
2525 }
2626
2727 if ($ this ->char () !== '= ' ) {
28- $ parameterName .= $ this ->char ();
28+ $ parameterName .= strtolower ( $ this ->char () );
2929 } else {
3030 $ parameters [$ parameterName ] = $ this ->getValue ();
3131 $ parameterName = '' ;
Original file line number Diff line number Diff line change @@ -1043,10 +1043,18 @@ public function getCacheKeyInfo()
10431043 * Get Key for caching block content
10441044 *
10451045 * @return string
1046+ * @throws \Magento\Framework\Exception\LocalizedException
10461047 */
10471048 public function getCacheKey ()
10481049 {
10491050 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+ }
10501058 return static ::CUSTOM_CACHE_KEY_PREFIX . $ this ->getData ('cache_key ' );
10511059 }
10521060
You can’t perform that action at this time.
0 commit comments