diff --git a/tools/reporter/htdocs/.htaccess b/tools/reporter/htdocs/.htaccess index 4e98fdc23e87..42430c6fe611 100644 --- a/tools/reporter/htdocs/.htaccess +++ b/tools/reporter/htdocs/.htaccess @@ -1,16 +1,16 @@ RewriteEngine On -RewriteRule ^app/query(/)?(.*)$ query.php$1 [QSA,L] -RewriteRule ^app/report/screenshot(/)?(.*)$ screenshot.php$1 [QSA,L] -RewriteRule ^app/report(/)?(.*)$ report.php$1 [QSA,L] -RewriteRule ^app/stats(/)?(.*)$ stats.php$1 [QSA,L] -RewriteRule ^app/login(/)?(.*)$ login.php$1 [QSA,L] -RewriteRule ^app/logout(/)?(.*)$ logout.php$1 [QSA,L] -RewriteRule ^privacy(/)? privacy.php$1 [QSA,L] -RewriteRule ^service(/)? service.php$1 [QSA,L] +RewriteRule ^app/query(/)?(.*)$ query.php$2 [QSA,L] +RewriteRule ^app/report/screenshot(/)?(.*)$ screenshot.php$2 [QSA,L] +RewriteRule ^app/report(/)?(.*)$ report.php$2 [QSA,L] +RewriteRule ^app/stats(/)?(.*)$ stats.php$2 [QSA,L] +RewriteRule ^app/login(/)?(.*)$ login.php$2 [QSA,L] +RewriteRule ^app/logout(/)?(.*)$ logout.php$2 [QSA,L] +RewriteRule ^privacy(/)? privacy.php$2 [QSA,L] +RewriteRule ^service(/)? service.php$2 [QSA,L] RewriteRule ^app index.php [QSA,L] #Static Content -RewriteRule ^(scripts|styles)$/(.*)$ $1/$2 [QSA,L] - \ No newline at end of file +#RewriteRule ^(scripts|styles)$/(.*)$ $1/$2 [QSA,L] + diff --git a/tools/reporter/htdocs/index.php b/tools/reporter/htdocs/index.php index 10bc61ead84c..5dfbadf0cea1 100644 --- a/tools/reporter/htdocs/index.php +++ b/tools/reporter/htdocs/index.php @@ -42,10 +42,6 @@ require_once($config['base_path'].'/includes/iolib.inc.php'); require_once($config['base_path'].'/includes/db.inc.php'); require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.php'); -// Start Session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix printheaders(); $content = initializeTemplate(); diff --git a/tools/reporter/htdocs/login.php b/tools/reporter/htdocs/login.php index 5947eb81e5a7..cbb5f445f8cc 100644 --- a/tools/reporter/htdocs/login.php +++ b/tools/reporter/htdocs/login.php @@ -42,10 +42,6 @@ require_once($config['base_path'].'/includes/db.inc.php'); require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.php'); require_once($config['base_path'].'/includes/security.inc.php'); -// start the session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix printheaders(); if (!isset($_SESSION['login']) || $_SESSION['login'] != true){ diff --git a/tools/reporter/htdocs/logout.php b/tools/reporter/htdocs/logout.php index 8b9ecb1f5ebb..fd9a098071f6 100644 --- a/tools/reporter/htdocs/logout.php +++ b/tools/reporter/htdocs/logout.php @@ -39,10 +39,6 @@ require_once('../config.inc.php'); require_once($config['base_path'].'/includes/iolib.inc.php'); -// start the session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix printheaders(); $_SESSION = array(); diff --git a/tools/reporter/htdocs/query.php b/tools/reporter/htdocs/query.php index 8053fdf982b9..68da5b5458b1 100644 --- a/tools/reporter/htdocs/query.php +++ b/tools/reporter/htdocs/query.php @@ -43,10 +43,6 @@ require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.ph require_once($config['base_path'].'/includes/security.inc.php'); require_once($config['base_path'].'/includes/query.inc.php'); -// start the session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix printheaders(); if(!isset($_GET['method'])){ diff --git a/tools/reporter/htdocs/report.php b/tools/reporter/htdocs/report.php index c79991d03b19..6f642e2af45c 100644 --- a/tools/reporter/htdocs/report.php +++ b/tools/reporter/htdocs/report.php @@ -43,17 +43,12 @@ require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.ph require_once($config['base_path'].'/includes/security.inc.php'); require_once($config['base_path'].'/includes/query.inc.php'); - -// Start Session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix printheaders(); // Open DB $db = NewDBConnection($config['db_dsn']); $db->SetFetchMode(ADODB_FETCH_ASSOC); - + $reportQuery =& $db->Execute("SELECT * FROM report, host WHERE report.report_id = ".$db->quote($_GET['report_id'])." diff --git a/tools/reporter/htdocs/screenshot.php b/tools/reporter/htdocs/screenshot.php index 7c24fca34123..41521ab50328 100644 --- a/tools/reporter/htdocs/screenshot.php +++ b/tools/reporter/htdocs/screenshot.php @@ -46,10 +46,6 @@ require_once($config['base_path'].'/includes/security.inc.php'); error_reporting(0); // Headers -// Start Session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix printheaders(); if($securitylib->isLoggedIn() === true){ diff --git a/tools/reporter/htdocs/stats.php b/tools/reporter/htdocs/stats.php index f207923fd58f..ff3e7b1435d1 100644 --- a/tools/reporter/htdocs/stats.php +++ b/tools/reporter/htdocs/stats.php @@ -42,11 +42,7 @@ require_once($config['base_path'].'/includes/db.inc.php'); require_once($config['base_path'].'/includes/contrib/smarty/libs/Smarty.class.php'); require_once($config['base_path'].'/includes/security.inc.php'); -// Start Session -session_name('reportSessID'); -session_start(); -header("Cache-control: private"); //IE 6 Fix - +printheaders(); // Open DB $db = NewDBConnection($config['db_dsn']); diff --git a/tools/reporter/includes/iolib.inc.php b/tools/reporter/includes/iolib.inc.php index f611b2956a70..62e36a1d0985 100644 --- a/tools/reporter/includes/iolib.inc.php +++ b/tools/reporter/includes/iolib.inc.php @@ -142,19 +142,22 @@ function resolveBehindLogin($q){ } function printheaders(){ - - $now = date("D M j G:i:s Y T"); - header('Expires: ' . $now); - header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); - header('Cache-Control: post-check=0, pre-check=0', false); - header('Pragma: no-cache'); - header('X-Powered-By: A Barrel of Monkey\'s '); + $now = date("D M j G:i:s Y T"); + header('Expires: ' . $now); + header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); + header('Cache-Control: post-check=0, pre-check=0', false); + header('Pragma: no-cache'); + header('X-Powered-By: A Barrel of Monkey\'s '); + session_name('reportSessID'); + session_start(); + header("Cache-control: private"); //IE 6 Fix } function strip_all_tags($input){ - while($input != strip_tags($input)) { - $input = strip_tags($input); - } - return $input; + while($input != strip_tags($input)) { + $input = strip_tags($input); + } + return $input; } + ?> \ No newline at end of file