diff options
author | jim-p <jimp@pfsense.org> | 2015-03-31 09:26:04 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-03-31 09:27:29 -0400 |
commit | ddddf255b802e00a3408208f942a5d4049b6fd3a (patch) | |
tree | 43b23c3fee021db71886f0f27eaf339e4b8825a8 /usr/local/www/load_balancer_monitor_edit.php | |
parent | adf62c63f3dd4b4de7bd65f2a85a4dcc1085914e (diff) | |
download | pfsense-ddddf255b802e00a3408208f942a5d4049b6fd3a.zip pfsense-ddddf255b802e00a3408208f942a5d4049b6fd3a.tar.gz |
Fix a few misc encoding issues in load balancer code.
Diffstat (limited to 'usr/local/www/load_balancer_monitor_edit.php')
-rw-r--r-- | usr/local/www/load_balancer_monitor_edit.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/load_balancer_monitor_edit.php b/usr/local/www/load_balancer_monitor_edit.php index 1f30a4f..280244b 100644 --- a/usr/local/www/load_balancer_monitor_edit.php +++ b/usr/local/www/load_balancer_monitor_edit.php @@ -97,8 +97,11 @@ 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."); + if (preg_match('/[ \/]/', $_POST['name'])) + $input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field."); + + if (strlen($_POST['name']) > 16) + $input_errors[] = gettext("The 'name' field must be 16 characters or less."); switch($_POST['type']) { case 'icmp': { |