summaryrefslogtreecommitdiffstats
path: root/usr/local/www/load_balancer_monitor_edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-03-31 09:26:04 -0400
committerjim-p <jimp@pfsense.org>2015-03-31 09:26:04 -0400
commit05a463843a9dbb4901974f22fb361873adcaae4b (patch)
treed757d264f41abc43cdd2e7b9bbbf28d3c835f1f0 /usr/local/www/load_balancer_monitor_edit.php
parent807cdae39e9e5d836f40d9b1a828bd3d71a9013c (diff)
downloadpfsense-05a463843a9dbb4901974f22fb361873adcaae4b.zip
pfsense-05a463843a9dbb4901974f22fb361873adcaae4b.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.php7
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': {
OpenPOWER on IntegriCloud