Files
librenms-librenms/includes/html/pages/device/overview/syslog.inc.php
T
Tony MurrayandGitHub 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

25 lines
1.0 KiB
PHP

<?php
if ($config['enable_syslog']) {
$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '".$config['dateformat']['mysql']['compact']."') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
if (count($syslog)) {
echo '<div class="row">
<div class="col-md-12">
<div class="panel panel-default panel-condensed">
<div class="panel-heading">';
echo '<a href="device/device='.$device['device_id'].'/tab=logs/section=syslog/"><i class="fa fa-clone fa-lg icon-theme" aria-hidden="true"></i> <strong>Recent Syslog</strong></a>';
echo ' </div>
<table class="table table-hover table-condensed table-striped">';
foreach ($syslog as $entry) {
unset($syslog_output);
include 'includes/html/print-syslog.inc.php';
echo $syslog_output;
}
echo '</table>';
echo '</div>';
echo '</div>';
echo '</div>';
}
}