projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
c836637
)
Added isSandbox check around the __toString check
author
Scott Smith
<scsmith@ebuyer.com>
Tue, 15 Apr 2014 16:21:28 +0000 (17:21 +0100)
committer
Scott Smith
<scsmith@ebuyer.com>
Tue, 15 Apr 2014 16:21:28 +0000 (17:21 +0100)
lib/Twig/Extension/Sandbox.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Sandbox.php
b/lib/Twig/Extension/Sandbox.php
index
c59609f
..
c58259c
100644
(file)
--- 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');
}