mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-28 18:02:07 +02:00
update if statement security feature
This commit is contained in:
@@ -485,6 +485,12 @@ class Smarty_Compiler extends Smarty {
|
||||
$is_arg_stack = array();
|
||||
|
||||
for ($i = 0; $i < count($tokens); $i++) {
|
||||
|
||||
if($this->security && $tokens[$i+1] == '(' && !in_array($tokens[$i],$this->security_settings["ALLOW_IF_FUNCS"])) {
|
||||
$this->_syntax_error("(secure mode) '".$tokens[$i]."' not allowed in if statement");
|
||||
}
|
||||
|
||||
|
||||
$token = &$tokens[$i];
|
||||
switch ($token) {
|
||||
case 'eq':
|
||||
|
||||
Reference in New Issue
Block a user