summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-06-02 22:24:26 +0545
committerPhil Davis <phil.davis@inf.org>2015-06-02 22:24:26 +0545
commit239f204b407969394963d8a96f0e162b2d367cae (patch)
tree3da134d7b91186258c39a2204d909fdd327d60c9 /usr/local/www/wizards
parent6aab8d8746da49b070990292dfef7c5e2925816a (diff)
downloadpfsense-239f204b407969394963d8a96f0e162b2d367cae.zip
pfsense-239f204b407969394963d8a96f0e162b2d367cae.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/www/wizards')
-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