diff options
author | Darren Embry <dse@webonastick.com> | 2012-07-26 19:06:59 -0400 |
---|---|---|
committer | Darren Embry <dse@webonastick.com> | 2012-07-26 19:06:59 -0400 |
commit | 70c355c745659214b369d761bbf9f1485b17a9d7 (patch) | |
tree | 7ee5db15437a928bf179e05bd4df27e8e22f57e6 /usr | |
parent | 82e7f8e4b0278017fc27d4d5a84b8e5e6a2ce51d (diff) | |
download | pfsense-70c355c745659214b369d761bbf9f1485b17a9d7.zip pfsense-70c355c745659214b369d761bbf9f1485b17a9d7.tar.gz |
validate that zone name doesn't contain spaces.
fixes #2560
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/services_captiveportal_zones_edit.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_zones_edit.php b/usr/local/www/services_captiveportal_zones_edit.php index 3603a24..518458a 100644 --- a/usr/local/www/services_captiveportal_zones_edit.php +++ b/usr/local/www/services_captiveportal_zones_edit.php @@ -61,6 +61,10 @@ if ($_POST) { $reqdfieldsn = array(gettext("Zone name")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + + if (preg_match('/[\s\r\n]/', $_POST['zone'])) { + $input_errors[] = gettext("The zone name must not contain any spaces."); + } foreach ($a_cp as $cpkey => $cpent) { if ($cpent['zone'] == $_POST['zone']){ |