Sandbox `foreachVars` in templates
authorAlexander Ebert <ebert@woltlab.com>
Sun, 8 Aug 2021 09:29:26 +0000 (11:29 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 8 Sep 2021 11:57:10 +0000 (13:57 +0200)
commit99c6a1a1debdc0779eb743c609b4d81a29046b92
treeeb22101c118ee04eb1777eb061a37d2424cc2463
parent7dc40d2b98027eac38fb713dee09fc07519c5a2f
Sandbox `foreachVars` in templates

Nesting the same template inside a `foreach` loop that is also accessed inside the nested call will overwrite the values from the outer template due to identical identifiers being used.

The sandbox did not protected `$this->foreachVars` despite being stateful.

See #4431
Fixes #4444
wcfsetup/install/files/lib/system/template/TemplateEngine.class.php