skin xss
Posted: Sat Apr 10, 2010 6:57 am
index.php?skin=<script>alert('ciao');</script>
Code: Select all
if ( isset($_GET['skin']) )
$skin = $_GET['skin'];
elseif ( isset($_COOKIE['zmSkin']) )
$skin = $_COOKIE['zmSkin'];
else
$skin = "classic";
Code: Select all
if ( isset($_GET['skin']) && preg_match('#^[a-z]+$#', $_GET['skin']))
$skin = $_GET['skin'];
elseif ( isset($_COOKIE['zmSkin']) && preg_match('#^[a-z]+$#', $_COOKIE['zmSkin']) )
$skin = $_COOKIE['zmSkin'];
else
$skin = "classic";