Filter all user input to reduce the security impact of manipulated data

This commit is contained in:
EA Durbin
2006-06-17 06:10:10 +00:00
committed by WineHQ
parent 02c5682c01
commit f982c8459e
53 changed files with 988 additions and 542 deletions

View File

@@ -11,7 +11,13 @@ require(BASE."include/incl.php");
require(BASE."include/distributions.php");
require(BASE."include/testResults.php");
if ($_REQUEST['sub'])
$aClean = array(); //array of filtered user input
$aClean['sub'] = makeSafe($_REQUEST['sub']);
$aClean['iDistributionId'] = makeSafe( $_REQUEST['iDistributionId']);
if ($aClean['sub'])
{
if(!$_SESSION['current']->hasPriv("admin"))
{
@@ -19,14 +25,14 @@ if ($_REQUEST['sub'])
exit;
}
if($_REQUEST['sub'] == 'delete')
if($aClean['sub'] == 'delete')
{
$oDistribution = new distribution($_REQUEST['iDistributionId']);
$oDistribution = new distribution($aClean['iDistributionId']);
$oDistribution->delete();
redirect($_SERVER['PHP_SELF']);
}
}
$oDistribution = new distribution($_REQUEST['iDistributionId']);
$oDistribution = new distribution($aClean['iDistributionId']);
//exit with error if no vendor
if(!$oDistribution->iDistributionId)