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>
Sun, 8 Aug 2021 09:29:26 +0000 (11:29 +0200)
commit939a25854849ff2148a5bf72a621fd75029f7006
tree5a7455222e43b3b4feabfd0e259a4e290458c8ab
parentf23c576cc41ddd3a6f446c20ade7e0fbb8f68084
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