From ed2cbe739d883e996a93626db1507ca80e0d087e Mon Sep 17 00:00:00 2001 From: Tony Lambregts Date: Sun, 16 Jul 2006 05:39:56 +0000 Subject: [PATCH] Stop allowing anonymous test results --- include/version.php | 16 ++++++++++++---- testResults.php | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/version.php b/include/version.php index db3b83c..79d1e2c 100644 --- a/include/version.php +++ b/include/version.php @@ -802,10 +802,18 @@ class Version { $oTest->ShowVersionsTestingTable($_SERVER['PHP_SELF']."?iVersionId=".$this->iVersionId."&iTestingId=", 5); } - echo '
iVersionId.'>'; - echo ''; - echo '
'; - + if($_SESSION['current']->isLoggedIn()) + { + echo '
iVersionId.'>'; + echo ''; + echo '
'; + } else + { + echo '
'; + echo ''; + echo ''; + echo '
'; + } echo ""; /* close the table */ diff --git a/testResults.php b/testResults.php index a074db8..a7ade65 100644 --- a/testResults.php +++ b/testResults.php @@ -18,6 +18,10 @@ $aClean['iVersionId'] = makeSafe($_REQUEST['iVersionId']); $aClean['iDistributionId'] = makeSafe($_REQUEST['iDistributionId']); $aClean['sDistribution'] = makeSafe($_REQUEST['sDistribution']); +//deny access if not logged on +if(!$_SESSION['current']->isLoggedIn()) + util_show_error_page_and_exit("Insufficient privileges to create test results. Are you sure you are logged in?"); + if ($aClean['sSub']) {