From 1b0e2d388555f6eb9b05dfe4c7878c7ee705fa03 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 27 Mar 2026 11:20:20 +0100 Subject: [PATCH 1/3] feat(i18n): add translation for invalid IPv6 address --- core/ui/public/i18n/en/translation.json | 1 + 1 file changed, 1 insertion(+) diff --git a/core/ui/public/i18n/en/translation.json b/core/ui/public/i18n/en/translation.json index 42b70445f..625f38df2 100644 --- a/core/ui/public/i18n/en/translation.json +++ b/core/ui/public/i18n/en/translation.json @@ -823,6 +823,7 @@ "ip_allowlist_placeholder": "Eg. 192.168.7.0/24", "ip_allowlist_helper": "Enter one IPv4 or CIDR address per line. Leave empty to allow access from any IP address", "invalid_ipv4": "Invalid IPv4 address: {ip}", + "invalid_ipv6": "Invalid IPv6 address: {ip}", "automatic": "Automatic", "restricted": "Access restricted", "attributes": "Attributes", From 9f60745caadc5a74f89fb4e8a4653020d858158c Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 27 Mar 2026 11:33:50 +0100 Subject: [PATCH 2/3] feat(validation): add IPv6 validation to IP allowlist --- .../components/settings/CreateOrEditHttpRouteModal.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/ui/src/components/settings/CreateOrEditHttpRouteModal.vue b/core/ui/src/components/settings/CreateOrEditHttpRouteModal.vue index 08630ffeb..7fe144fb4 100644 --- a/core/ui/src/components/settings/CreateOrEditHttpRouteModal.vue +++ b/core/ui/src/components/settings/CreateOrEditHttpRouteModal.vue @@ -502,11 +502,16 @@ export default { // IPv4 and IPv4 CIDR pattern const ipv4Pattern = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[1-2][0-9]|3[0-2]))?$/; + // IPv6 and IPv6 CIDR pattern + const ipv6Pattern = + /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))?$/; for (const ip of ipList) { - if (!ipv4Pattern.test(ip)) { + if (!ipv4Pattern.test(ip) && !ipv6Pattern.test(ip)) { + // Determine if it looks like an IPv6 address + const isIPv6Like = ip.includes(":") || ip.includes("::"); this.error.ip_allowlist = this.$t( - "settings_http_routes.invalid_ipv4", + isIPv6Like ? "settings_http_routes.invalid_ipv6" : "settings_http_routes.invalid_ipv4", { ip: ip } ); if (isValidationOk) { From fe4d6cbf109236346632cc4c9e443fb4070743f9 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 27 Mar 2026 11:33:55 +0100 Subject: [PATCH 3/3] feat(i18n): update IP allowlist helper text to include IPv6 support --- core/ui/public/i18n/en/translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/public/i18n/en/translation.json b/core/ui/public/i18n/en/translation.json index 625f38df2..d30399312 100644 --- a/core/ui/public/i18n/en/translation.json +++ b/core/ui/public/i18n/en/translation.json @@ -821,7 +821,7 @@ "instance_pattern": "Allowed characters: A-Z, a-z, 0-9, _ and -", "ip_allowlist": "Allow access from (optional)", "ip_allowlist_placeholder": "Eg. 192.168.7.0/24", - "ip_allowlist_helper": "Enter one IPv4 or CIDR address per line. Leave empty to allow access from any IP address", + "ip_allowlist_helper": "Enter one IPv4/IPv6 or CIDR address per line. Leave empty to allow access from any IP address", "invalid_ipv4": "Invalid IPv4 address: {ip}", "invalid_ipv6": "Invalid IPv6 address: {ip}", "automatic": "Automatic",