From 8d9c3f7610953e4519ec578e61961c22d3fe4404 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 24 Jan 2011 16:38:43 +0000 Subject: Properly check empty fields when specifying bandwidth values. --- usr/local/www/wizards/traffic_shaper_wizard.inc | 2 +- usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc | 2 +- usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc | 2 +- usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/local/www/wizards/traffic_shaper_wizard.inc b/usr/local/www/wizards/traffic_shaper_wizard.inc index 31da91a..3f1bd92 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard.inc @@ -223,7 +223,7 @@ function step2_stepsubmitphpaction() { /* Input Validation */ $steps = intval($config['ezshaper']['step1']['numberofconnections']); for ($i = 0; $i < $steps; $i++) { - for ($j = $i + 1; $j < $steps; $j++) { + for ($j = $i + 1; $j <= $steps; $j++) { $wannum = $i+1; if ($_POST["conn{$i}interface"] == $_POST["conn{$j}interface"]) { $savemsg=gettext("You cannot select the same interface for WAN# {$wannum} and WAN #{$j}."); diff --git a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc index fa15609..152cef5 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc @@ -246,7 +246,7 @@ function step2_stepsubmitphpaction() { /* Input Validation */ $steps = intval($config['ezshaper']['step1']['numberofconnections']); for ($i = 0; $i < $steps; $i++) { - for ($j = $i + 1; $j < $steps; $j++) { + for ($j = $i + 1; $j <= $steps; $j++) { if ($_POST["conn{$i}interface"] == $_POST["conn{$j}interface"] || $_POST["conn{$i}interface"] == $_POST["local{$j}interface"]) { $savemsg=gettext("You cannot select the same interface for connections {$i} and {$j}."); $stepid--; diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc index 7c13c6c..c63cf77 100755 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc @@ -254,7 +254,7 @@ function step2_stepsubmitphpaction() { $steps = intval($config['ezshaper']['step1']['numberofconnections']); $localint = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); for ($i = 0; $i < $steps; $i++) { - for ($j = $i + 1; $j < $steps; $j++) { + for ($j = $i + 1; $j <= $steps; $j++) { if ($_POST["conn{$i}interface"] == $_POST["conn{$j}interface"]) { $savemsg=gettext("You cannot select the same interface for connections {$i} and {$j}."); $stepid--; diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc index 44d5314..731d327 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc @@ -228,7 +228,7 @@ function step2_stepsubmitphpaction() { /* Input Validation */ $steps = intval($config['ezshaper']['step1']['numberofconnections']); for ($i = 0; $i < $steps; $i++) { - for ($j = $j; $j < $steps; $j++) { + for ($j = $i + 1; $j <= $steps; $j++) { if ($_POST["conn{$i}interface"] == $_POST["conn{$j}interface"]) { $savemsg=gettext("You cannot select the same interface for different LAN #{$i} and LAN #{$j}."); $stepid--; -- cgit v1.1