Closed NoNoNo closed 8 months ago
Version: Latte 3.0.10 (latest), PHP 8.1.24
Using filter replace in Sandbox & StrictParsing mode:
Fatal error: Uncaught Latte\CompileException: Forbidden variable $this. in vendor/latte/latte/src/Latte/Essential/Passes.php on line 113
<?php require_once 'vendor/autoload.php'; $latte = new \Latte\Engine; $latte->setPolicy(\Latte\Sandbox\SecurityPolicy::createSafePolicy()); $latte->setSandboxMode(); $latte->setStrictParsing(); $latte->setLoader(new \Latte\Loaders\StringLoader); $latte->render('{$test|replace("foo", "case")}', ['test' => 'test-foo']);
Output of string test-case.
test-case
Version: Latte 3.0.10 (latest), PHP 8.1.24
Bug Description
Using filter replace in Sandbox & StrictParsing mode:
Steps To Reproduce
Expected Behavior
Output of string
test-case
.