diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-06 14:27:36 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-06 14:27:55 -0200 |
commit | 9cd1455d9d7ca12060a9ee40c9779cbe2a29a666 (patch) | |
tree | fe0fad7c079d0d8f9aa898dcaa3c4c916b728a1e /src/usr/local/www | |
parent | f1926a412514eb55715bbd9a952005dab27dbdae (diff) | |
download | pfsense-9cd1455d9d7ca12060a9ee40c9779cbe2a29a666.zip pfsense-9cd1455d9d7ca12060a9ee40c9779cbe2a29a666.tar.gz |
Validate pppoe_subnet before use it in calculation. Ticket #5720
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/services_pppoe_edit.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php index de6b202..b1b53ad 100644 --- a/src/usr/local/www/services_pppoe_edit.php +++ b/src/usr/local/www/services_pppoe_edit.php @@ -160,6 +160,11 @@ if ($_POST) { 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"); } + if (!is_numeric($_POST['pppoe_subnet']) || + $_POST['pppoe_subnet'] < 0 || + $_POST['pppoe_subnet'] > 32) { + $input_errors[] = gettext("Subnet mask must be an interger between 0 and 32"); + } $_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']); $subnet_start = ip2ulong($_POST['remoteip']); |