librenms-librenms/includes/html/graphs/global/processor_separate.inc.php
Tony Murray 36431dd296 Security fix: unauthorized access (#10091)
* Security fix: unauthorized access
Affects nginx users:
Moved php files outside of public html directory (Apache was protected by .htaccess)

Affects all users:
Some files did not check for authentication and could disclose some info.
Better checks before including files from user input

* git mv html/includes/ includes/html
git mv html/pages/ includes/html/
2019-04-11 23:26:42 -05:00

31 lines
771 B
PHP

<?php
$i = 0;
foreach (dbFetchRows('SELECT * FROM `processors` AS P, devices AS D WHERE D.device_id = P.device_id') as $proc) {
$rrd_filename = rrd_name($proc['hostname'], array('processor', $proc['processor_type'], $proc['processor_index']));
if (rrdtool_check_rrd_exists($rrd_filename)) {
$descr = short_hrDeviceDescr($proc['processor_descr']);
$rrd_list[$i]['filename'] = $rrd_filename;
$rrd_list[$i]['descr'] = $descr;
$rrd_list[$i]['ds'] = 'usage';
$rrd_list[$i]['area'] = 1;
$i++;
}
}
$unit_text = 'Load %';
$units = '%';
$total_units = '%';
$colours = 'mixed';
$scale_min = '0';
$scale_max = '100';
$nototal = 1;
require 'includes/html/graphs/generic_multi_line.inc.php';