summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-06-02 22:24:26 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-06-04 17:06:31 -0300
commitb3bba7fe13f7f7150a9f66d16fc630716d612a83 (patch)
tree562edbb57fb20cbd507c402163911560acd18e59 /usr/local
parenteefd77734badd5e435d3cbd2032eddc6e3186a6e (diff)
downloadpfsense-b3bba7fe13f7f7150a9f66d16fc630716d612a83.zip
pfsense-b3bba7fe13f7f7150a9f66d16fc630716d612a83.tar.gz
Improve setup wizard host name check
Redmine #4712 It seems good enough to make the regex strings here be "reasonable". The full checks are done after pressing Next and the correct routines are called that do an exhaustive check. There seems not much point in trying to re-engineer all that here also. Odd things like "-hostname" and "hostname-" would be allowed through here but are caught by the full validation check. "." and "|" were being allowed in this regex - no idea why!
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/wizards/setup_wizard.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index 683e3f4..631513f 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -71,7 +71,7 @@
<type>input</type>
<bindstofield>wizardtemp->system->hostname</bindstofield>
<description>EXAMPLE: myserver</description>
- <validate>^[a-z0-9.|-]+$</validate>
+ <validate>^[a-zA-Z0-9-]+$</validate>
<message>Invalid Hostname</message>
</field>
<field>
@@ -79,7 +79,7 @@
<type>input</type>
<bindstofield>wizardtemp->system->domain</bindstofield>
<description>EXAMPLE: mydomain.com</description>
- <validate>^[a-z0-9.|-]+$</validate>
+ <validate>^[a-zA-Z0-9.-]+$</validate>
<message>Domain name field is invalid</message>
</field>
<field>
OpenPOWER on IntegriCloud