From: Alexander Ebert Date: Tue, 24 Apr 2012 15:23:53 +0000 (+0200) Subject: Disabled sandbox for templates by default X-Git-Tag: 2.0.0_Beta_1~1145^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=32715640934c457b75e5594a1bb5e5e12a219ac2;p=GitHub%2FWoltLab%2FWCF.git Disabled sandbox for templates by default You can still enable the sandbox by setting sandbox=true within the include tag. In fact you shouldn't do it anyway unless you have a real good reason ;) --- diff --git a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php index 0b7362810f..f781b15865 100644 --- a/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php +++ b/wcfsetup/install/files/lib/system/template/TemplateScriptingCompiler.class.php @@ -742,7 +742,7 @@ class TemplateScriptingCompiler { unset($args['append']); } - $sandbox = true; + $sandbox = false; if (isset($args['sandbox'])) { $sandbox = $args['sandbox']; unset($args['sandbox']); @@ -810,7 +810,7 @@ class TemplateScriptingCompiler { $phpCode .= "ob_start();\n"; } - $phpCode .= '$this->includeTemplate('.$file.', array('.$argString.'), ('.$sandbox.' ? 1 : 0), $this->v[\'__PACKAGE_ID\']);'."\n"; + $phpCode .= '$this->includeTemplate('.$file.', array('.$argString.'), '.($sandbox ? 1 : 0).', $this->v[\'__PACKAGE_ID\']);'."\n"; if ($assignVar !== false) { $phpCode .= '$this->'.($append ? 'append' : 'assign').'('.$assignVar.', ob_get_clean());'."\n";