Will this code make my gallery vulnerable? Will this code make my gallery vulnerable?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Will this code make my gallery vulnerable?

Started by davelu, January 28, 2007, 07:09:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davelu

Hey,
I added change layout to my gallery (emmawatson.ca/CoppGallery), and I was wondering if my n00b coding is going to create any vulnerabilities (the added codes work fine). 

I added
index.php
if($skin!=NULL){
setcookie('galleryskin',$skin,time()+86400*30);
header('Location: index.php');
}


functions.inc.php

        global $CONFIG, $USER, $skin;
if ( ($skin==NULL) & (!isset($_COOKIE['galleryskin'])) ){
$skin="1";
setcookie('galleryskin',$skin,time()+86400*30);
}
else if($skin!=NULL)
{
setcookie('galleryskin',$skin,time()+86400*30);
}
else {
$skin=$_COOKIE['galleryskin'];
}

themes.inc.php

switch($skin){
case "1":
$banner = "/images/Emma_Watson_Gallery_Banner1.jpg";
$css = "style1.css";
$ad_border="88a4ae";
$ad_bg="abbcc2";
$backgroundurl = "/images/gallery_bg1.jpg";
break;

case "2":
$css = "style2.css";
$banner = "/images/Emma_Watson_Gallery_Banner2.jpg";
$backgroundurl = "/images/gallery_bg2.jpg";
break;

case "3":
$css = "style3.css";
$banner = "/images/Emma_Watson_Gallery_Banner3.jpg";
$backgroundurl = "/images/gallery_bg3.jpg";
break;

default: $css = "style1.css";
$banner = "/images/Emma_Watson_Gallery_Banner1.jpg";
$backgroundurl = "/images/gallery_bg1.jpg";
$ad_border="88a4ae";
$ad_bg="abbcc2";
}