Issue Bug Closed

#60082Backport: Objects cast to string are not escaped

Philipp Maier 07/03/14, 13:12 updated 10/02/18, 11:54

Description

Basically if you have a class like this:

class HelloWorld {
public function __toString() { return ‘<script>alert(&#8220;hello world&#8221;);</script>‘ }
}

and you assign it as a fluid variable like this:

$this->view->assign(‘helloworld’, new HelloWorld());

and have a template like this:

{helloworld}

you’re going to have a bad time.

———
Copied over from the Flow Bug Tracker: http://forge.typo3.org/issues/60069

Reviews 1