Useless XSS fix.

pull/193/head
Michael R Sweet 16 years ago
parent 6788efa5ce
commit 51e76f4109
  1. 9
      www/software.php

@ -23,11 +23,18 @@ fclose($fp);
// Get form data, if any...
if (array_key_exists("FILE", $_GET))
{
$file = $_GET["FILE"];
if (strpos($file, "../") !== FALSE ||
!file_exists("/home/ftp.easysw.com/pub/$file"))
$file = "";
}
else
$file = "";
if (array_key_exists("SITE", $_GET))
if (array_key_exists("SITE", $_GET) &&
array_key_exists($_GET["SITE"], $PROJECT_SITELIST))
{
$site = $_GET["SITE"];
setcookie("SITE", $site, time() + 90 * 86400, "/");

Loading…
Cancel
Save