From 2235d3229c998f7467e6a9e1f2ada749cebee8d6 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Tue, 14 May 2024 22:39:47 -0700 Subject: [PATCH] Fix dns alias validation pattern to allow wildcard DNS again. (#1203) --- files/www/cgi-bin/ports | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/www/cgi-bin/ports b/files/www/cgi-bin/ports index 521bcc27..827785c2 100755 --- a/files/www/cgi-bin/ports +++ b/files/www/cgi-bin/ports @@ -1215,6 +1215,7 @@ end local js_mac_pattern = [[ pattern='^(?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$' ]] local js_host_pattern = [[ pattern='^[a-zA-Z0-9][a-zA-Z0-9\-]*$' ]] +local js_alias_pattern = [[ pattern='^(\*\.|)?[a-zA-Z0-9][a-zA-Z0-9\-]*$' ]] local js_port_range_pattern = [[ pattern='^\s*\d{1,5}(?:\s*-\s*\d{1,5})?\s*$' ]] local function print_heading_vsep() @@ -1579,7 +1580,7 @@ local function print_aliases() local host = parms["alias" .. val .. "_host"] local ip = parms["alias" .. val .. "_ip"] print_new_entry_vsep(val, list , 4) - html.print("") + html.print("") html.print("     ") html.print("