From b3bba7fe13f7f7150a9f66d16fc630716d612a83 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 2 Jun 2015 22:24:26 +0545 Subject: 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! --- usr/local/www/wizards/setup_wizard.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local') 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 @@ input wizardtemp->system->hostname EXAMPLE: myserver - ^[a-z0-9.|-]+$ + ^[a-zA-Z0-9-]+$ Invalid Hostname @@ -79,7 +79,7 @@ input wizardtemp->system->domain EXAMPLE: mydomain.com - ^[a-z0-9.|-]+$ + ^[a-zA-Z0-9.-]+$ Domain name field is invalid -- cgit v1.1