summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_zones_edit.php
diff options
context:
space:
mode:
authorDarren Embry <dse@webonastick.com>2012-07-26 19:06:59 -0400
committerDarren Embry <dse@webonastick.com>2012-07-26 19:06:59 -0400
commit70c355c745659214b369d761bbf9f1485b17a9d7 (patch)
tree7ee5db15437a928bf179e05bd4df27e8e22f57e6 /usr/local/www/services_captiveportal_zones_edit.php
parent82e7f8e4b0278017fc27d4d5a84b8e5e6a2ce51d (diff)
downloadpfsense-70c355c745659214b369d761bbf9f1485b17a9d7.zip
pfsense-70c355c745659214b369d761bbf9f1485b17a9d7.tar.gz
validate that zone name doesn't contain spaces.
fixes #2560
Diffstat (limited to 'usr/local/www/services_captiveportal_zones_edit.php')
-rw-r--r--usr/local/www/services_captiveportal_zones_edit.php4
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']){
OpenPOWER on IntegriCloud