- bugfix uppercase TRUE, FALSE and NULL did not work when security was enabled https://github.com/smarty-php/smarty/issues/282

This commit is contained in:
uwetews
2016-09-07 00:15:44 +02:00
parent e82f966682
commit e5bbc052b1
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -472,7 +472,7 @@ class Smarty_Security
return true;
}
if (!empty($this->trusted_constants)) {
if (!in_array($const, $this->trusted_constants)) {
if (!in_array(strtolower($const), $this->trusted_constants)) {
$compiler->trigger_template_error("Security: access to constant '{$const}' not permitted");
return false;
}