Files
librenms-librenms/includes/html/pages/device/overview/eventlog.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

21 lines
841 B
PHP

<?php
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=eventlog/">';
echo '<i class="fa fa-bookmark fa-lg icon-theme" aria-hidden="true"></i> <strong>Recent Events</strong></a>';
echo ' </div>
<table class="table table-hover table-condensed table-striped">';
$eventlog = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '".$config['dateformat']['mysql']['compact']."') as humandate FROM `eventlog` WHERE `device_id` = ? ORDER BY `datetime` DESC LIMIT 0,10", [$device['device_id']]);
foreach ($eventlog as $entry) {
include 'includes/html/print-event-short.inc.php';
}
echo '</table>';
echo '</div>';
echo '</div>';
echo '</div>';