diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-01-18 11:57:18 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-01-18 11:57:18 +0000 |
commit | 51e43abc8da6fc9e2b8802365767052415771ffb (patch) | |
tree | 234619de3aabf0afddde8f69c42a647407769756 /usr | |
parent | 20989f5a5a508e8e9960c0f8d46e3df50857bae5 (diff) | |
download | pfsense-51e43abc8da6fc9e2b8802365767052415771ffb.zip pfsense-51e43abc8da6fc9e2b8802365767052415771ffb.tar.gz |
Ticket #274. Propperly handle custom options.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_dhcp.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 523d04e..b480217 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -306,11 +306,11 @@ if ($_POST) { $config['dhcpd'][$if]['rootpath'] = $_POST['rootpath']; // Handle the custom options rowhelper - $numbervalue = array(); if(isset($config['dhcpd'][$if]['numberoptions']['item'])) unset($config['dhcpd'][$if]['numberoptions']['item']); - for($x=0; $x<isset($_POST["number{$x}"]); $x++) { - if(is_int(intval($_POST["number{$x}"]))) { + for($x=0; $x<99; $x++) { + if(isset($_POST["number{$x}"]) && ctype_digit($_POST["number{$x}"])) { + $numbervalue = array(); $numbervalue['number'] = htmlspecialchars($_POST["number{$x}"]); $numbervalue['value'] = htmlspecialchars($_POST["value{$x}"]); $config['dhcpd'][$if]['numberoptions']['item'][] = $numbervalue; |