PR #1030 introduced changes to the escape modifier to prevent double-escaping when auto-escaping is enabled.
However, this change also applies to template variables where the nofilter flag is used. This results in the counter-intuitive behavior that explicitly calling the escape modifier when using nofilter has no effect. In our use cases, we use nofilter combined with an explicit escape when we're applying HTML-producing modifiers to unescaped data; for example, {$description|escape|nl2br nofilter}. The net result of this change is 5.4.0 introducing immediate security issues in our application.
This behavior is not reflected in the documentation at https://www.smarty.net/docs/en/language.modifier.escape.tpl or https://smarty-php.github.io/smarty/stable/designers/language-modifiers/language-modifier-escape/, nor is the new force option.
When using nofilter, explicit uses of escape probably should apply.
Thoughts @Amaury ?
PR #1030 introduced changes to the escape modifier to prevent double-escaping when auto-escaping is enabled.
However, this change also applies to template variables where the nofilter flag is used. This results in the counter-intuitive behavior that explicitly calling the escape modifier when using nofilter has no effect. In our use cases, we use nofilter combined with an explicit escape when we're applying HTML-producing modifiers to unescaped data; for example,
{$description|escape|nl2br nofilter}. The net result of this change is 5.4.0 introducing immediate security issues in our application.This behavior is not reflected in the documentation at https://www.smarty.net/docs/en/language.modifier.escape.tpl or https://smarty-php.github.io/smarty/stable/designers/language-modifiers/language-modifier-escape/, nor is the new force option.
When using nofilter, explicit uses of escape probably should apply.
Thoughts @Amaury ?