From ca81d5bcddf82ee0bd3ad62f473e5037b20976f5 Mon Sep 17 00:00:00 2001 From: James Strong Date: Wed, 6 Nov 2024 19:19:29 -0500 Subject: [PATCH] Auth TLS: Improve redirect RegEx. (#12249) --- internal/ingress/annotations/authtls/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ingress/annotations/authtls/main.go b/internal/ingress/annotations/authtls/main.go index 1c6bad4857..54fa20b5ed 100644 --- a/internal/ingress/annotations/authtls/main.go +++ b/internal/ingress/annotations/authtls/main.go @@ -42,7 +42,7 @@ const ( var ( authVerifyClientRegex = regexp.MustCompile(`^(on|off|optional|optional_no_ca)$`) - redirectRegex = regexp.MustCompile(`^((https?://)?[A-Za-z0-9\-.]*(:\d+)?/[A-Za-z0-9\-.]*)?$`) + redirectRegex = regexp.MustCompile(`^((https?://)?[A-Za-z0-9\-.]+(:\d+)?)?(/[A-Za-z0-9\-.]+)*/?$`) ) var authTLSAnnotations = parser.Annotation{