diff options
author | jim-p <jimp@pfsense.org> | 2010-10-25 16:31:57 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-10-25 16:31:57 -0400 |
commit | c26c208f34ce5b6b22567bf47551c066637048d4 (patch) | |
tree | d2bc025a80a5c3d5a5d04d49f718b0c226348163 /usr/local/www/load_balancer_pool_edit.php | |
parent | 5bb6e1f54022c796e8c37510b287337c7b234cd1 (diff) | |
download | pfsense-c26c208f34ce5b6b22567bf47551c066637048d4.zip pfsense-c26c208f34ce5b6b22567bf47551c066637048d4.tar.gz |
Do not allow spaces in load balancer name fields, they are invalid in relayd.
Diffstat (limited to 'usr/local/www/load_balancer_pool_edit.php')
-rwxr-xr-x | usr/local/www/load_balancer_pool_edit.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php index e37f51c..0e15dc2 100755 --- a/usr/local/www/load_balancer_pool_edit.php +++ b/usr/local/www/load_balancer_pool_edit.php @@ -80,6 +80,10 @@ if ($_POST) { for ($i=0; isset($config['load_balancer']['lbpool'][$i]); $i++) if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id)) $input_errors[] = gettext("This pool name has already been used. Pool names must be unique."); + + if (strpos($_POST['name'], " ") !== false) + $input_errors[] = gettext("You cannot use spaces in the 'name' field."); + if (!is_port($_POST['port'])) $input_errors[] = gettext("The port must be an integer between 1 and 65535."); if (is_array($_POST['servers'])) { |