diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-12-17 22:18:43 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-12-17 22:18:43 -0600 |
commit | bdabc817f21adb31e6f512fe59f7676997eaee8d (patch) | |
tree | 71fb5f159038a52420828a278248298a06562a71 /src/usr/local/www/services_captiveportal_ip_edit.php | |
parent | 0f1d38b60be6762e30364b4683542cd6943c2707 (diff) | |
download | pfsense-bdabc817f21adb31e6f512fe59f7676997eaee8d.zip pfsense-bdabc817f21adb31e6f512fe59f7676997eaee8d.tar.gz |
Validate IP passthrough bandwidth values within sane range. Ticket #5655
Diffstat (limited to 'src/usr/local/www/services_captiveportal_ip_edit.php')
-rw-r--r-- | src/usr/local/www/services_captiveportal_ip_edit.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/usr/local/www/services_captiveportal_ip_edit.php b/src/usr/local/www/services_captiveportal_ip_edit.php index b479f3c..379711a 100644 --- a/src/usr/local/www/services_captiveportal_ip_edit.php +++ b/src/usr/local/www/services_captiveportal_ip_edit.php @@ -144,6 +144,14 @@ if ($_POST) { $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_allowedips as $ipent) { if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent)) { continue; |