brandonkelly
2 years ago
No known key found for this signature in database
GPG Key ID: 5E86D0CED64C7093
1 changed files with
6 additions and
11 deletions
-
src/web/twig/Extension.php
|
|
@ -1628,17 +1628,12 @@ class Extension extends AbstractExtension implements GlobalsInterface |
|
|
|
*/ |
|
|
|
private function _checkFilterSupport($arrow): void |
|
|
|
{ |
|
|
|
if (is_string($arrow)) { |
|
|
|
$forbidden = ['system', 'passthru', 'exec']; |
|
|
|
|
|
|
|
$arrow = strtolower($arrow); |
|
|
|
if (isset($arrow[0]) && $arrow[0] === "\\") { |
|
|
|
$arrow = substr($arrow, 1); |
|
|
|
} |
|
|
|
|
|
|
|
if (in_array($arrow, $forbidden, true)) { |
|
|
|
throw new RuntimeError('Not supported in this filter.'); |
|
|
|
} |
|
|
|
if (is_string($arrow) && in_array(ltrim(strtolower($arrow), '\\'), [ |
|
|
|
'system', |
|
|
|
'passthru', |
|
|
|
'exec', |
|
|
|
])) { |
|
|
|
throw new RuntimeError('Not supported in this filter.'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|