mirror of
https://github.com/michaelrsweet/mxml.git
synced 2025-04-17 15:22:09 +00:00
Useless XSS fix.
This commit is contained in:
parent
6788efa5ce
commit
51e76f4109
@ -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…
Reference in New Issue
Block a user