- 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

View File

@@ -1,6 +1,7 @@
===== 3.1.31-dev ===== (xx.xx.xx) ===== 3.1.31-dev ===== (xx.xx.xx)
07.09.2016 07.09.2016
- bugfix using nocache like attribute with value true like {plugin nocache=true} did not work https://github.com/smarty-php/smarty/issues/285 - bugfix using nocache like attribute with value true like {plugin nocache=true} did not work https://github.com/smarty-php/smarty/issues/285
- bugfix uppercase TRUE, FALSE and NULL did not work when security was enabled https://github.com/smarty-php/smarty/issues/282
01.09.2016 01.09.2016
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280 - performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280

View File

@@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.31-dev/9'; const SMARTY_VERSION = '3.1.31-dev/10';
/** /**
* define variable scopes * define variable scopes

View File

@@ -472,7 +472,7 @@ class Smarty_Security
return true; return true;
} }
if (!empty($this->trusted_constants)) { 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"); $compiler->trigger_template_error("Security: access to constant '{$const}' not permitted");
return false; return false;
} }