Re: Question about Smarty [secure?]
| From: | Sylvain Bergé | 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, ~ryadexUse 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:/* In a world without walls and borders, who needs windows and gates ? */index.php?page=../../pics_of_siteop_nekkid/index.htmlindex.php ---------- [...] /* Setup, get the page variable and do anythingyou need to it. Inormalise it to make it as short as possible,since the value of thepage variable is actually a path to a file. Ialso have a default setif 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 :or less amusingly index.php?page=/etc/passwd ?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/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