Re: [SMARTY] Security
| From: | Ferdinand Beyer | Date: | Mon, 20 Jan 2003 17:06:47 +0000 |
| Subject: | Re: [SMARTY] Security | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7274@lists.php.net to get a copy of this message | ||
On 19 Jan 2003 at 14:07, Monte Ohrt wrote:
> $template_dir should be secured, SMARTY_DIR, no. Why would you access
> files from there? As for the debug template, just be sure that
> $smarty->debug_tpl is set to the location of the debug.tpl file, it
> should work even if it is not in a secure directory.
Does this mean that you plan to treat $template_dir secure internally
even if it is not in the $secure_dir array like I suggested?
I agree with you that there is no need to access the SMARTY_DIR
except for the debug template. But in 2.3.1 debug.tpl does _not_
work when security is enabled and SMARTY_DIR is not in the
$secure_dir array. Just enable debugging and security and you'll get
the warning:
Smarty error: (secure mode) accessing "file:f:\...\smarty\debug.tpl" is
not allowed
By the way, while testing this PHP told me that "the variable results is
not defined" - it is used as a return value in the
_generate_debug_output() method on line 785 - please check that!
--
Ferdinand Beyer
<fbeyer@clickhand.de>