summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_captiveportal_mac_edit.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-12-17 22:01:40 -0600
committerChris Buechler <cmb@pfsense.org>2015-12-17 22:01:40 -0600
commit0f1d38b60be6762e30364b4683542cd6943c2707 (patch)
tree938219737be78705c481c217b8f773fd04688aa0 /src/usr/local/www/services_captiveportal_mac_edit.php
parent5e71234e381084de09ab1d42c2fb30c9e9d52fc2 (diff)
downloadpfsense-0f1d38b60be6762e30364b4683542cd6943c2707.zip
pfsense-0f1d38b60be6762e30364b4683542cd6943c2707.tar.gz
Validate CP MAC passthrough bandwidth. Ticket #5655
Diffstat (limited to 'src/usr/local/www/services_captiveportal_mac_edit.php')
-rw-r--r--src/usr/local/www/services_captiveportal_mac_edit.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/usr/local/www/services_captiveportal_mac_edit.php b/src/usr/local/www/services_captiveportal_mac_edit.php
index 23f3c8f..762c608 100644
--- a/src/usr/local/www/services_captiveportal_mac_edit.php
+++ b/src/usr/local/www/services_captiveportal_mac_edit.php
@@ -153,6 +153,12 @@ if ($_POST) {
if ($_POST['bw_down'] && !is_numeric($_POST['bw_down'])) {
$input_errors[] = gettext("Download speed needs to be an integer");
}
+ if ($_POST['bw_up'] && ($_POST['bw_up'] > 999999 || $_POST['bw_up'] < 1)) {
+ $input_errors[] = gettext("Upload speed must be between 1 and 999999");
+ }
+ if ($_POST['bw_down'] && ($_POST['bw_down'] > 999999 || $_POST['bw_down'] < 1)) {
+ $input_errors[] = gettext("Download speed must be between 1 and 999999");
+ }
foreach ($a_passthrumacs as $macent) {
if (isset($id) && ($a_passthrumacs[$id]) && ($a_passthrumacs[$id] === $macent)) {
OpenPOWER on IntegriCloud