RE: Announcement: Smarty 1.4.3 now available
| From: | Monte Ohrt | Date: | Wed, 20 Jun 2001 22:36:22 +0000 |
| Subject: | RE: Announcement: Smarty 1.4.3 now available | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-916@lists.php.net to get a copy of this message | ||
These are good arguments. I'd like to hear some more feedback on this
one from the list. We have to weigh the security threats of direct
access to the templates_c directory (any exploits anyone can think of?)
vs. the performance overhead of a check on each template (is it even a
concern?, maybe .0001 seconds or something, I'll have to do a benchmark)
hans@linux.gelrevision.nl wrote:
>
> On 20-Jun-01 Monte Ohrt wrote:
> > Should Smarty be responsible for this security test?
>
> I wouldn't judge this. Being not only a hobby coder but also involved in bus.
> project it's my job to make everything as secure as possible (whithin my
> knowledge).
>
> > This is extra logic that must be put into every template page and checked for
> > on every
> > invocation of the script(s). It would hardly _ever_ be used, only when a
> > person specifially knows the URL to try.
>
> As far as I can see it Smarty will be used for opensource projects a lot. It
> has a great speed and it's not to hard to work with it. All these advantages
> will be destroyed if some script kiddo will look at the source and do a search
> on any newsserver for .tpl.php extentions. The fact that a lot of people will
> be lazy (or not able to read the manual since English isn't their native tongue
> ) will possibly result in installations where the template, template_c and
> cache dir will be located within the webdir.
>
> > If you are worried about this
> > security, it should be your responsibility to move the directories out
> > of document root.
> >
> > I guess I don't like the idea of the logic overhead put into Smarty
> > templates for such a small percentage of times it would actually be of
> > use. Does this sound unreasonable?
>
> Since those dirs are the result of using Smarty I do think you should matter.
> I've been on the list for a few weeks now and I havn't seen anyone mention it
> before. Are they all using it within the webroot?
>
> It's no big problem for me to write an extended class that will be used with
> phpreview to make it handle this issue but I think it would be good if it
> would be a default.
>
> Regards,
>
> Hans