View Single Post
  #8  
Old 02-20-2008, 01:57 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Exclamation Security stuff

I would watch out for such insecure code:
PHP Code:
if ($_POST['newtemplate']) {
$_SESSION["template"]=$_POST['newtemplate'];
} else if (
$_GET['newtemplate'])  {
$_SESSION["template"]=$_GET['newtemplate'];

I would do that like this:
PHP Code:
if ($_POST['newtemplate']) {
$_SESSION["template"]=$_POST['newtemplate'];
} else if (
$_GET['newtemplate'])  {
$_SESSION["template"]=$_GET['newtemplate'];
}

if(!
is_dir("templates/".$_SESSION["template"])) $_SESSION["template"]=$cfgrow['template']; 
__________________
photoblog | portfolio | addons | Donate
Reply With Quote