From 20989f5a5a508e8e9960c0f8d46e3df50857bae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Mon, 18 Jan 2010 11:44:04 +0000 Subject: Ticket #288. Fix some sanitation checking to allow propper editing of entries. --- usr/local/www/services_igmpproxy_edit.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/services_igmpproxy_edit.php b/usr/local/www/services_igmpproxy_edit.php index e97869b..a6f2571 100755 --- a/usr/local/www/services_igmpproxy_edit.php +++ b/usr/local/www/services_igmpproxy_edit.php @@ -71,10 +71,14 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - if ($_POST['type'] == "upstream") - foreach ($a_igmpproxy as $proxyentry) + if ($_POST['type'] == "upstream") { + foreach ($a_igmpproxy as $pid => $proxyentry) { + if (isset($id) && $id == $pid) + continue; if ($proxyentry['type'] == "upstream" && $proxyentry['ifname'] != $_POST['interface']) $input_errors[] = "Only one 'upstream' interface can be configured."; + } + } $igmpentry = array(); $igmpentry['ifname'] = $_POST['ifname']; $igmpentry['threshold'] = $_POST['threshold']; -- cgit v1.1