diff options
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/load_balancer_monitor_edit.php | 3 | ||||
-rwxr-xr-x | usr/local/www/load_balancer_pool_edit.php | 4 | ||||
-rwxr-xr-x | usr/local/www/load_balancer_relay_action_edit.php | 2 | ||||
-rwxr-xr-x | usr/local/www/load_balancer_relay_protocol_edit.php | 3 | ||||
-rwxr-xr-x | usr/local/www/load_balancer_virtual_server_edit.php | 3 |
5 files changed, 15 insertions, 0 deletions
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php index 6156c65..7cc9ef3 100755 --- a/usr/local/www/load_balancer_monitor_edit.php +++ b/usr/local/www/load_balancer_monitor_edit.php @@ -94,6 +94,9 @@ if ($_POST) { if (($_POST['name'] == $config['load_balancer']['monitor_type'][$i]['name']) && ($i != $id)) $input_errors[] = gettext("This monitor name has already been used. Monitor names must be unique."); + if (strpos($_POST['name'], " ") !== false) + $input_errors[] = gettext("You cannot use spaces in the 'name' field."); + switch($_POST['type']) { case 'icmp': { break; 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'])) { diff --git a/usr/local/www/load_balancer_relay_action_edit.php b/usr/local/www/load_balancer_relay_action_edit.php index 667a0af..396cd9b 100755 --- a/usr/local/www/load_balancer_relay_action_edit.php +++ b/usr/local/www/load_balancer_relay_action_edit.php @@ -123,6 +123,8 @@ if ($_POST) { if (($_POST['name'] == $config['load_balancer']['lbactions'][$i]['name']) && ($i != $id)) $input_errors[] = gettext("This action name has already been used. Action names must be unique."); + if (strpos($_POST['name'], " ") !== false) + $input_errors[] = gettext("You cannot use spaces in the 'name' field."); if (!$input_errors) { $actent = array(); diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php index ecd8ce4..1c0daa8 100755 --- a/usr/local/www/load_balancer_relay_protocol_edit.php +++ b/usr/local/www/load_balancer_relay_protocol_edit.php @@ -85,6 +85,9 @@ if ($_POST) { if (($_POST['name'] == $config['load_balancer']['lbprotocol'][$i]['name']) && ($i != $id)) $input_errors[] = gettext("This protocol name has already been used. Protocol names must be unique."); + if (strpos($_POST['name'], " ") !== false) + $input_errors[] = gettext("You cannot use spaces in the 'name' field."); + switch($_POST['type']) { case 'tcp': case 'http': diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php index 4cbf0e2..e93f0d6 100755 --- a/usr/local/www/load_balancer_virtual_server_edit.php +++ b/usr/local/www/load_balancer_virtual_server_edit.php @@ -85,6 +85,9 @@ if ($_POST) { if (($_POST['name'] == $config['load_balancer']['virtual_server'][$i]['name']) && ($i != $id)) $input_errors[] = gettext("This virtual server name has already been used. Virtual server 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."); |