mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
security fixes to non-global users
git-svn-id: http://www.observium.org/svn/observer/trunk@455 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -70,7 +70,14 @@ if($_POST['device']) {
|
||||
$where .= " AND D.device_id = '".$_POST['device']."'";
|
||||
}
|
||||
|
||||
$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog AS S, devices AS D WHERE S.device_id = D.device_id $where ORDER BY datetime DESC LIMIT 1000";
|
||||
if($_SESSION['userlevel'] >= '5') {
|
||||
$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog AS S, devices AS D
|
||||
WHERE S.device_id = D.device_id $where ORDER BY datetime DESC LIMIT 1000";
|
||||
} else {
|
||||
$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog AS S, devices AS D, devices_perms AS P
|
||||
WHERE S.device_id = P.device_id AND P.user_id = " . $_SESSION['user_id'] . " AND S.device_id = D.device_id $where ORDER BY datetime DESC LIMIT 1000";
|
||||
}
|
||||
|
||||
$query = mysql_query($sql);
|
||||
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
||||
while($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); }
|
||||
|
||||
Reference in New Issue
Block a user