You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since around version 3.1.23 it seems (this commit) Smarty will no longer accept TRUE, FALSE and NULL as language structures (uppercase), but will instead try and access them like constants, which in turn could be disallowed by the security settings.
The in_array function in PHP is case sensitive, while PHP in fact allows uppercase structures (even though they are inherently slower), using them in a Smarty template will not work.
I was wondering if this is on purpose to try and enforce a better code style?
The text was updated successfully, but these errors were encountered:
I should add that the obvious fix is to validate the constants as lowercase in this particular case, but I do not know if this opens up for invulnerabilities?
if (in_array(strtolower($const), array('true', 'false', 'null'))) {
returntrue;
}
Since around version 3.1.23 it seems (this commit) Smarty will no longer accept TRUE, FALSE and NULL as language structures (uppercase), but will instead try and access them like constants, which in turn could be disallowed by the security settings.
sysplugins/smarty_security.php:
The
in_array
function in PHP is case sensitive, while PHP in fact allows uppercase structures (even though they are inherently slower), using them in a Smarty template will not work.I was wondering if this is on purpose to try and enforce a better code style?
The text was updated successfully, but these errors were encountered: