Re: Question about Smarty [secure?]

From: Date: Fri, 22 Jun 2001 10:51:28 +0000
Subject: Re: Question about Smarty [secure?]
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-945@lists.php.net to get a copy of this message
' ' wrote:
Hey there... How would you handle dynamic URI's or dynamic strings? This is great stuff btw and I appreciate the feedback! Also, would calling a class seem to be the best method to handle this? Thanks, ~ryadex
Use this : index.php?url=http://yourserver/pics_if_siteop_nekkid/index.html It's not possible do use relative path like this... However check the url var with regex for allow only this type of form.... Sylvain.B.
--- Gavin Cowie <squirtsomething@gavincowie.com> wrote:
index.php ---------- [...] /* Setup, get the page variable and do anything
you need to it. I
normalise it to make it as short as possible,
since the value of the
page variable is actually a path to a file. I
also have a default set
if page isn't. */
is that secure enough for you? passing the filename as a var via the query string I mean. Could I do something unpleasant like :
index.php?page=../../pics_of_siteop_nekkid/index.html
or less amusingly index.php?page=/etc/passwd ?
if ($page) { // normalise } else { $page=default.html
--- You are currently subscribed to smarty as: ryadex@yahoo.com To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at
http://www.phpinsider.com/php/code/Smarty/ __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ --- You are currently subscribed to smarty as: sylvain.berge@medasys.fr To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
/* In a world without walls and borders, who needs windows and gates ? */

« previous php.smarty.general (#945) next »