« Previous | Next » 

Revision 9744e768

ID9744e768fdab93cadf97fe0c3e8f523fddc95b14
Parent aa812026
Child 4f423a61

Added by Bastian Waidelich over 7 years ago

[!!!][BUGFIX] Enforce escaping on string-casted objects

This change assures that the escape interceptor is active for objects
that are casted to strings implicitly.

Background:
For HTML requests Fluid internally applies the
``HtmlspecialcharsViewHelper`` on variables before rendering them.
An ``is_string()`` check in the escaping ViewHelpers effectively
disabled this behavior for objects that are converted to strings
implicitly via a ``__toString()`` method.

This is a breaking change if you relied on the previous behavior that
escaping is disabled for objects. In this case you can apply the
format.raw ViewHelper to achieve the old behavior::

{object -> f:format.raw()}

But be aware that this might pose a security issue if
``$object->__toString()`` returns an unsecure string.

Change-Id: I7c66d3247ffda8f5dc5a03a823f0a05a56ff686b
Fixes: #60069
Releases: master, 2.2, 2.1

  • added
  • modified
  • copied
  • renamed
  • deleted