diff --git a/html/includes/edit-host.inc b/html/includes/edit-host.inc index bf13044077..8f034f2bcf 100644 --- a/html/includes/edit-host.inc +++ b/html/includes/edit-host.inc @@ -4,8 +4,12 @@ $ignore = $_POST['ignore']; $type = $_POST['type']; $disabled = $_POST['disabled']; + $community = $_POST['community']; + $snmpver = $_POST['snmpver']; - $sql = "UPDATE `devices` SET `purpose` = '$descr', `type` = '$type', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'"; +#FIXME needs more sanity checking! + $sql = "UPDATE `devices` SET `purpose` = '" . mysql_escape_string($descr) . "', `community` = '" . mysql_escape_string($community) . "', `type` = '$type'"; + $sql .= ", `snmpver` = '" . mysql_escape_string($snmpver) . "', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'"; $query = mysql_query($sql); $rows_updated = mysql_affected_rows(); diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/bgp.inc.php index 87539e3575..69504db52a 100644 --- a/html/pages/device/bgp.inc.php +++ b/html/pages/device/bgp.inc.php @@ -5,16 +5,9 @@ echo("