diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-14 21:09:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-14 21:09:31 +0000 |
commit | e52f293fd16390959c813593ec5b9af42f7e1f61 (patch) | |
tree | d3050841e1f89ce93d1aee9f88cbbc526d56c7c1 | |
parent | 8b7a167077525ecc98f2c6c233941ea12d96306e (diff) | |
download | pfsense-e52f293fd16390959c813593ec5b9af42f7e1f61.zip pfsense-e52f293fd16390959c813593ec5b9af42f7e1f61.tar.gz |
Enforce maximum and minimum state values
Ticket #356
-rwxr-xr-x | usr/local/www/system_advanced.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index 9f01f77..315992e 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -79,12 +79,17 @@ if ($_POST) { if ($_POST['altfirmwareurl']) if ($_POST['firmwareurl'] == "" || $_POST['firmwarename'] == "") $input_errors[] = "You must specify a base URL and a filename for the alternate firmware."; - if ($_POST['altpkgconfigurl']) if ($_POST['pkgconfig_base_url'] == "" || $_POST['pkgconfig_filename'] == "") $input_errors[] = "You must specifiy and base URL and a filename before using an alternate pkg_config.xml."; } - + if ($_POST['maximumstates'] <> "") { + if ($_POST['maximumstates'] < 1000) + $input_errors[] = "States must be above 1000 and below 100000000"; + if ($_POST['maximumstates'] > 100000000) + $input_errors[] = "States must be above 1000 and below 100000000"; + } + if (!$input_errors) { if($_POST['disablefilter'] == "yes") { $config['system']['disablefilter'] = "enabled"; |