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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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";
}