mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-04 02:47:14 +00:00
Add an always_allowed_in_sandbox flag for filters, functions, and tags
This commit is contained in:
@@ -34,6 +34,7 @@ abstract class AbstractTwigCallable implements TwigCallableInterface
|
||||
'needs_charset' => false,
|
||||
'needs_is_sandboxed' => false,
|
||||
'is_variadic' => false,
|
||||
'always_allowed_in_sandbox' => false,
|
||||
'deprecation_info' => null,
|
||||
'deprecated' => false,
|
||||
'deprecating_package' => '',
|
||||
@@ -113,6 +114,11 @@ abstract class AbstractTwigCallable implements TwigCallableInterface
|
||||
return $this->options['needs_is_sandboxed'];
|
||||
}
|
||||
|
||||
public function isAlwaysAllowedInSandbox(): bool
|
||||
{
|
||||
return $this->options['always_allowed_in_sandbox'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user