Re: smarty security setting
| From: | Ivo Jansch | Date: | Wed, 23 May 2001 14:10:02 +0000 |
| Subject: | Re: smarty security setting | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-794@lists.php.net to get a copy of this message | ||
Hi,
Monte Ohrt wrote:
> *) strict syntax checking in IF logic (this will be the tricky one)
Maybe you can turn off function calls. So that only simple operator
statements can be used.
> *) restrict what files can be {included} (what should they be?)
Restrict it to a certain directory, or restrict it to a certain
owner/group (only files from 'nobody' for example).
> *) disable {php}{/php} functionality
And also disable the use of SMARTY_PHP_ALLOW ofcourse.
> Are there any other vulnerabilities anyone can think of?
Maybe in the cache/compiler: Someone overwriting a cached or compiled
template with some other malicious script and setting the modification
date in the past so the compiler won't notice it.
It would be nice if the security option isn't just a true/false toggle,
but can be configured. (with flags for example, like $m_securitySetting
= SMARTY_DISABLE_PHP|SMARTY_DISABLE_FETCH, or something like that, or
multiple variables)
Greetings,
Ivo
--
Ivo Jansch <ivo@ibuildings.nl>
ibuildings.nl BV - information technology
http://www.ibuildings.nl