mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 16:26:55 +02:00
authentication check on the map file now
git-svn-id: http://www.observium.org/svn/observer/trunk@641 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+8
-1
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
include("../config.php");
|
include("../config.php");
|
||||||
include("../includes/functions.php");
|
include("../includes/functions.php");
|
||||||
|
include("includes/authenticate.inc");
|
||||||
|
|
||||||
#FIXME no auth on thie file??
|
|
||||||
if ($_GET['device']) { $where = "WHERE device_id = ".$_GET['device']; } else { $where = ""; }
|
if ($_GET['device']) { $where = "WHERE device_id = ".$_GET['device']; } else { $where = ""; }
|
||||||
$deviceresult = mysql_query("SELECT * from devices $where");
|
$deviceresult = mysql_query("SELECT * from devices $where");
|
||||||
|
|
||||||
@@ -17,6 +17,12 @@ if (preg_match("/^[a-z]*$/", $_GET['format']))
|
|||||||
|
|
||||||
";
|
";
|
||||||
|
|
||||||
|
if(!$_SESSION['authenticated'])
|
||||||
|
{
|
||||||
|
$map .= "\"Not authenticated\" [fontsize=20 fillcolor=\"lightblue\" URL=\"/\" shape=box3d]\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
while ($device = mysql_fetch_array($deviceresult))
|
while ($device = mysql_fetch_array($deviceresult))
|
||||||
{
|
{
|
||||||
if($device)
|
if($device)
|
||||||
@@ -84,6 +90,7 @@ if (preg_match("/^[a-z]*$/", $_GET['format']))
|
|||||||
$done = 0;
|
$done = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$map .= "
|
$map .= "
|
||||||
};";
|
};";
|
||||||
|
|||||||
Reference in New Issue
Block a user