Auth TLS: Improve redirect RegEx. (#12322)

Co-authored-by: James Strong <strong.james.e@gmail.com>
This commit is contained in:
k8s-infra-cherrypick-robot 2024-11-06 23:05:30 -08:00 committed by GitHub
parent 567a6c2ef2
commit 2d201230e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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{