From f8b6431222602e206eac046fa68e24a8c35c1659 Mon Sep 17 00:00:00 2001 From: Darren Embry Date: Fri, 26 Oct 2012 16:02:37 -0400 Subject: restrict '/' from virtual server name field fixes #2656 --- usr/local/www/load_balancer_virtual_server_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php index 554bf36..ea429d6 100755 --- a/usr/local/www/load_balancer_virtual_server_edit.php +++ b/usr/local/www/load_balancer_virtual_server_edit.php @@ -85,8 +85,8 @@ 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 (preg_match('/[ \/]/', $_POST['name'])) + $input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field."); if ($_POST['port'] != "" && !is_portoralias($_POST['port'])) $input_errors[] = gettext("The port must be an integer between 1 and 65535, a port alias, or left blank."); -- cgit v1.1