diff options
author | Darren Embry <dse@webonastick.com> | 2012-10-26 16:02:37 -0400 |
---|---|---|
committer | Darren Embry <dse@webonastick.com> | 2012-10-26 16:02:37 -0400 |
commit | f8b6431222602e206eac046fa68e24a8c35c1659 (patch) | |
tree | 05039705d1c040e543e9c3f53b845ec519e1ab01 | |
parent | 5c9f6cfcf411f8bbbb5d8df730bc4c0011dc2c49 (diff) | |
download | pfsense-f8b6431222602e206eac046fa68e24a8c35c1659.zip pfsense-f8b6431222602e206eac046fa68e24a8c35c1659.tar.gz |
restrict '/' from virtual server name field
fixes #2656
-rwxr-xr-x | usr/local/www/load_balancer_virtual_server_edit.php | 4 |
1 files changed, 2 insertions, 2 deletions
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."); |