From b2426022e71f73c5ff9a2866a31f051a4ca79963 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 20 Feb 2024 17:37:07 +0100 Subject: [PATCH 1/3] Add pattern validation for host name in configure-module/validate-input.json --- imageroot/actions/configure-module/validate-input.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imageroot/actions/configure-module/validate-input.json b/imageroot/actions/configure-module/validate-input.json index ea78012..c24c26a 100644 --- a/imageroot/actions/configure-module/validate-input.json +++ b/imageroot/actions/configure-module/validate-input.json @@ -20,7 +20,8 @@ "host": { "type": "string", "description": "Host name for the application, like 'mattermost.nethserver.org'", - "format": "idn-hostname" + "format": "idn-hostname", + "pattern": "\\." }, "lets_encrypt": { "type": "boolean", From b2fd1db94b89353da4123e9a3cd0a7830e693015 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 20 Feb 2024 17:37:12 +0100 Subject: [PATCH 2/3] Add validation message for host pattern --- ui/public/i18n/en/translation.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/public/i18n/en/translation.json b/ui/public/i18n/en/translation.json index 45ec767..f5b896d 100644 --- a/ui/public/i18n/en/translation.json +++ b/ui/public/i18n/en/translation.json @@ -35,7 +35,8 @@ "instance_configuration": "Configure {instance}", "configuring": "Configuring...", "email_format": "Invalid email address", - "domain_already_used_in_traefik":"This domain is already used in traefik" + "domain_already_used_in_traefik":"This domain is already used in traefik", + "host_pattern": "must be a valid fully qualified domain name" }, "about": { "title": "About" From f4e8ef7577325f990ec629c57b5ffa4096d90a67 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 20 Feb 2024 17:56:12 +0100 Subject: [PATCH 3/3] Update hostname format validation in configure-module --- imageroot/actions/configure-module/validate-input.json | 2 +- ui/public/i18n/en/translation.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/imageroot/actions/configure-module/validate-input.json b/imageroot/actions/configure-module/validate-input.json index c24c26a..b04331d 100644 --- a/imageroot/actions/configure-module/validate-input.json +++ b/imageroot/actions/configure-module/validate-input.json @@ -20,7 +20,7 @@ "host": { "type": "string", "description": "Host name for the application, like 'mattermost.nethserver.org'", - "format": "idn-hostname", + "format": "hostname", "pattern": "\\." }, "lets_encrypt": { diff --git a/ui/public/i18n/en/translation.json b/ui/public/i18n/en/translation.json index f5b896d..2e209c8 100644 --- a/ui/public/i18n/en/translation.json +++ b/ui/public/i18n/en/translation.json @@ -36,7 +36,8 @@ "configuring": "Configuring...", "email_format": "Invalid email address", "domain_already_used_in_traefik":"This domain is already used in traefik", - "host_pattern": "must be a valid fully qualified domain name" + "host_pattern": "Must be a valid fully qualified domain name", + "host_format": "Must be a valid fully qualified domain name" }, "about": { "title": "About"