From b7c9a6eb119a31f5049edb633f6647235b0aba48 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 11 Mar 2009 14:50:24 +0000 Subject: [PATCH] fixing things, adding better security git-svn-id: http://www.observium.org/svn/observer/trunk@351 61d68cd4-352d-0410-923a-c4978735b2b8 --- INSTALL | 10 +++++----- html/billing-graph.php | 2 ++ html/graph.php | 2 -- html/list_interfaces.php | 6 +----- html/netcmd.php | 3 ++- html/percentage.php | 4 +++- includes/static-config.php | 1 + remove-deleted-interfaces.php | 22 ++++++++++++++++++++++ renamehost.php | 21 +++++++++++++++++++++ 9 files changed, 57 insertions(+), 14 deletions(-) create mode 100755 remove-deleted-interfaces.php create mode 100755 renamehost.php diff --git a/INSTALL b/INSTALL index 78e0a7227..c9b8918ea 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -This software is currently Alpha, so no real documentation exists yes. - -Please see http://www.observernms.org for some instructions. - -Please also contact me via adama@memetic.org if you run in to any issues. +This software is currently Alpha, so no real documentation exists yet. + +Please see http://www.observernms.org for some instructions. + +Please also contact me via adama@memetic.org if you run in to any issues. diff --git a/html/billing-graph.php b/html/billing-graph.php index b7c501082..8bf2e4578 100644 --- a/html/billing-graph.php +++ b/html/billing-graph.php @@ -7,6 +7,8 @@ include("../config.php"); include("../includes/functions.php"); +include("includes/authenticate.inc"); +if(!$_SESSION['authenticated']) { echo("unauthenticated"); exit; } require("includes/jpgraph/jpgraph.php"); include("includes/jpgraph/jpgraph_line.php"); include("includes/jpgraph/jpgraph_utils.inc.php"); diff --git a/html/graph.php b/html/graph.php index 7a3ac0c6d..e1df53122 100644 --- a/html/graph.php +++ b/html/graph.php @@ -9,8 +9,6 @@ include("../config.php"); include("../includes/functions.php"); include("includes/authenticate.inc"); - - if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; } diff --git a/html/list_interfaces.php b/html/list_interfaces.php index 6161efd26..ef212a3ad 100644 --- a/html/list_interfaces.php +++ b/html/list_interfaces.php @@ -3,11 +3,7 @@ include("../config.php"); include("../includes/functions.php"); include("includes/authenticate.inc"); - -# ini_set('display_errors', 1); -# ini_set('display_startup_errors', 1); -# ini_set('log_errors', 1); -# ini_set('error_reporting', E_ALL); + if(!$_SESSION['authenticated']) { echo("unauthenticated"); exit; } if(isset($_GET['device_id'])){ diff --git a/html/netcmd.php b/html/netcmd.php index 43633779c..a5060a493 100644 --- a/html/netcmd.php +++ b/html/netcmd.php @@ -3,7 +3,6 @@ ini_set('allow_url_fopen', 0); ini_set('display_errors', 0); - if($_GET[debug]) { ini_set('display_errors', 1); ini_set('display_startup_errors', 1); @@ -14,6 +13,8 @@ if($_GET[debug]) { include("../config.php"); include("../includes/functions.php"); include("includes/authenticate.inc"); +if(!$_SESSION['authenticated']) { echo("unauthenticated"); exit; } + if($_GET['query'] && $_GET['cmd']) { $host = $_GET['query']; diff --git a/html/percentage.php b/html/percentage.php index 749a96d60..b8527baf0 100644 --- a/html/percentage.php +++ b/html/percentage.php @@ -1,6 +1,8 @@ diff --git a/renamehost.php b/renamehost.php new file mode 100755 index 000000000..af5abbfac --- /dev/null +++ b/renamehost.php @@ -0,0 +1,21 @@ +#!/usr/bin/php + \n"); +} + +?>