Skip to content

Commit

Permalink
- bugfix uppercase TRUE, FALSE and NULL did not work when security wa…
Browse files Browse the repository at this point in the history
…s enabled #282
  • Loading branch information
uwetews committed Sep 6, 2016
1 parent e82f966 commit e5bbc05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
===== 3.1.31-dev ===== (xx.xx.xx)
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 uppercase TRUE, FALSE and NULL did not work when security was enabled https://github.com/smarty-php/smarty/issues/282

01.09.2016
- performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280
Expand Down
2 changes: 1 addition & 1 deletion libs/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.31-dev/9';
const SMARTY_VERSION = '3.1.31-dev/10';

/**
* define variable scopes
Expand Down
2 changes: 1 addition & 1 deletion libs/sysplugins/smarty_security.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public function isTrustedConstant($const, $compiler)
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;
}
Expand Down

0 comments on commit e5bbc05

Please sign in to comment.