summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-06 14:25:18 -0200
committerRenato Botelho <renato@netgate.com>2016-01-06 14:27:55 -0200
commitf1926a412514eb55715bbd9a952005dab27dbdae (patch)
tree535ae876ca311419be7d65c3d64a08c7811011b8 /src/usr
parentb424b7efefd0d1a76259c9ada6bdb9ee825354af (diff)
downloadpfsense-f1926a412514eb55715bbd9a952005dab27dbdae.zip
pfsense-f1926a412514eb55715bbd9a952005dab27dbdae.tar.gz
Change number of PPPoE users range to 1-255 and add an extra POST validation
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/services_pppoe_edit.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index eca5618..de6b202 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -157,6 +157,9 @@ if ($_POST) {
if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) {
$input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
+ if (!is_numericint($_POST['n_pppoe_units']) || $_POST['n_pppoe_units'] > 255) {
+ $input_errors[] = gettext("Number of PPPoE users must be between 1 and 255");
+ }
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']);
$subnet_start = ip2ulong($_POST['remoteip']);
@@ -346,7 +349,7 @@ $section->addInput(new Form_Select(
'n_pppoe_units',
'No. of PPPoE Users',
$pconfig['n_pppoe_units'],
- array_combine(range(0, 255, 1), range(0, 255, 1))
+ array_combine(range(1, 255, 1), range(1, 255, 1))
));
$section->addInput(new Form_IpAddress(
OpenPOWER on IntegriCloud