From: Scott Smith Date: Tue, 15 Apr 2014 16:21:28 +0000 (+0100) Subject: Added isSandbox check around the __toString check X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=8dfa4325df669add82c385cd3860f5c7c7a6446a;p=web%2Fkonrad%2Ftwig.git Added isSandbox check around the __toString check --- diff --git a/lib/Twig/Extension/Sandbox.php b/lib/Twig/Extension/Sandbox.php index c59609f..c58259c 100644 --- a/lib/Twig/Extension/Sandbox.php +++ b/lib/Twig/Extension/Sandbox.php @@ -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'); }