mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webui: Allow full search on devices page (#8364)
* Update devices.inc.php * Update devices.inc.php * Replace $_POST with $vars Better protection for SQL injection attempts; Need to verify other files for same issue. * Fixed whitespace. *sigh* * More search options & sql injection fixes. +Allow full search on devices page; +Allow sysName search on alertlog page; +Allow sysName search on alerts page; +Allow sysName search on eventlog page; +Allow sysName search on poll-log page; +Allow sysName search on ports page; *Replaced all occurrences of $_POST with $vars in librenms/html/includes/table. ($vars are sanity-checked). * Whitespace fix * Fixed $where & $param * Add files via upload * Whitespaces.... Sometimes you want'em, sometimes you hate'em.
This commit is contained in:
committed by
Neil Lathwood
parent
2044f9bd14
commit
9f5b42b028
@@ -22,11 +22,11 @@ $columns = array(
|
||||
'last_modified',
|
||||
);
|
||||
|
||||
if (isset($_POST['device_id'])) {
|
||||
if (isset($vars['device_id'])) {
|
||||
// device_id supplied - get details for a single device
|
||||
// used by device MIB page
|
||||
$params = array(
|
||||
$_POST['device_id'],
|
||||
$vars['device_id'],
|
||||
);
|
||||
$sql = 'SELECT * FROM `device_mibs`';
|
||||
$wheresql = ' WHERE `device_id` = ?';
|
||||
@@ -78,7 +78,7 @@ foreach (dbFetchRows($sql, $params) as $mib) {
|
||||
foreach ($columns as $col) {
|
||||
$mibrow[$col] = $mib[$col];
|
||||
}
|
||||
if (!isset($_POST['device_id'])) {
|
||||
if (!isset($vars['device_id'])) {
|
||||
$device = device_by_id_cache($mib['device_id']);
|
||||
$mibrow['hostname'] = generate_device_link(
|
||||
$device,
|
||||
|
||||
Reference in New Issue
Block a user