summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-14 17:50:19 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-14 17:50:19 +0000
commit0138d49256d63c6c7ad76cced640e656bcc54326 (patch)
tree1339b577819dabe3afc4446153179f0790b0d8f7 /usr/local/www
parent92b17aeda55876f65318c7067aebbb4663fb01fa (diff)
downloadpfsense-0138d49256d63c6c7ad76cced640e656bcc54326.zip
pfsense-0138d49256d63c6c7ad76cced640e656bcc54326.tar.gz
Enforce bandwidth values
Ticket #347
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/interfaces.php3
-rwxr-xr-xusr/local/www/interfaces_lan.php3
-rwxr-xr-xusr/local/www/interfaces_opt.php4
-rwxr-xr-xusr/local/www/interfaces_wan.php3
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'])) {
OpenPOWER on IntegriCloud