make mac search work, fix sql injection while we're at it

git-svn-id: http://www.observium.org/svn/observer/trunk@2242 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-05-04 14:00:02 +00:00
parent f7957abe2c
commit f334e90fa7

View File

@@ -40,7 +40,7 @@ print_optionbar_end();
echo('<table width="100%" cellspacing="0" cellpadding="5">');
$where = "AND `ifPhysAddress` LIKE '%".$_POST['address']."%'";
$where = "AND `ifPhysAddress` LIKE '%".str_replace(':','',mres($_POST['address']))."%'";
if (is_numeric($_POST['device_id'])) { $where .= " AND I.device_id = '".$_POST['device_id']."'"; }
if ($_POST['interface']) { $where .= " AND I.ifDescr LIKE '".mres($_POST['interface'])."'"; }