Add an allow-list for tests to the sandbox security policy

This commit is contained in:
Fabien Potencier
2026-05-25 21:58:52 +02:00
parent 9a1d3d241f
commit 416d07da1d
21 changed files with 478 additions and 71 deletions
+6 -3
View File
@@ -107,6 +107,7 @@ use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
@@ -153,7 +154,7 @@ class __TwigTemplate_%x extends Template
*/
public function getDebugInfo(): array
{
return array ( 42 => 1,);
return array ( 43 => 1,);
}
public function getSourceContext(): Source
@@ -182,6 +183,7 @@ use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
@@ -242,7 +244,7 @@ class __TwigTemplate_%x extends Template
*/
public function getDebugInfo(): array
{
return array ( 48 => 1, 46 => 2, 39 => 1,);
return array ( 49 => 1, 47 => 2, 40 => 1,);
}
public function getSourceContext(): Source
@@ -276,6 +278,7 @@ use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
@@ -335,7 +338,7 @@ class __TwigTemplate_%x extends Template
*/
public function getDebugInfo(): array
{
return array ( 48 => 2, 46 => 4, 39 => 2,);
return array ( 49 => 2, 47 => 4, 40 => 2,);
}
public function getSourceContext(): Source