diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-14 17:50:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-14 17:50:19 +0000 |
commit | 0138d49256d63c6c7ad76cced640e656bcc54326 (patch) | |
tree | 1339b577819dabe3afc4446153179f0790b0d8f7 | |
parent | 92b17aeda55876f65318c7067aebbb4663fb01fa (diff) | |
download | pfsense-0138d49256d63c6c7ad76cced640e656bcc54326.zip pfsense-0138d49256d63c6c7ad76cced640e656bcc54326.tar.gz |
Enforce bandwidth values
Ticket #347
-rwxr-xr-x | usr/local/www/interfaces.php | 3 | ||||
-rwxr-xr-x | usr/local/www/interfaces_lan.php | 3 | ||||
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 4 | ||||
-rwxr-xr-x | usr/local/www/interfaces_wan.php | 3 |
4 files changed, 12 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 3bcb47e..30b8388 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -168,6 +168,9 @@ if ($_POST) { if ($_POST['mtu'] && (($_POST['mtu'] < 576) || ($_POST['mtu'] > 1500))) { $input_errors[] = "The MTU must be between 576 and 1500 bytes."; } + if($_POST['bandwidth'] <> "" && !is_numeric($_POST['bandwidth'])) { + $input_errors[] = "A valid bandwidth value is required 1-999999."; + } /* Wireless interface? */ if (isset($wancfg['wireless'])) { diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index 0f99a6c..e6d7384 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -90,6 +90,9 @@ if ($_POST) { if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) { $input_errors[] = "A valid subnet bit count must be specified."; } + if($_POST['bandwidth'] <> "" && !is_numeric($_POST['bandwidth'])) { + $input_errors[] = "A valid bandwidth value is required 1-999999."; + } /* Wireless interface? */ if (isset($lancfg['wireless'])) { diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index 0189fa4..eb559cf 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -142,8 +142,10 @@ if ($_POST) { } if ($_POST['mtu'] && (($_POST['mtu'] < 576) || ($_POST['mtu'] > 1500))) { $input_errors[] = "The MTU must be between 576 and 1500 bytes."; + } + if($_POST['bandwidth'] <> "" && !is_numeric($_POST['bandwidth'])) { + $input_errors[] = "A valid bandwidth value is required 1-999999."; } - } /* Wireless interface? */ diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index 3bcb47e..30b8388 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -168,6 +168,9 @@ if ($_POST) { if ($_POST['mtu'] && (($_POST['mtu'] < 576) || ($_POST['mtu'] > 1500))) { $input_errors[] = "The MTU must be between 576 and 1500 bytes."; } + if($_POST['bandwidth'] <> "" && !is_numeric($_POST['bandwidth'])) { + $input_errors[] = "A valid bandwidth value is required 1-999999."; + } /* Wireless interface? */ if (isset($wancfg['wireless'])) { |