mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 11:56:50 +00:00
Added isSandbox check around the __toString check
This commit is contained in:
@@ -93,7 +93,7 @@ class Twig_Extension_Sandbox extends Twig_Extension
|
||||
|
||||
public function ensureToStringAllowed($obj)
|
||||
{
|
||||
if (is_object($obj)) {
|
||||
if ($this->isSandboxed() && is_object($obj)) {
|
||||
$this->policy->checkMethodAllowed($obj, '__toString');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user