mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 10:19:34 +00:00
23 lines
715 B
Diff
23 lines
715 B
Diff
diff --git a/va/http.go b/va/http.go
|
|
index 5eefabcb4..0188d4005 100644
|
|
--- a/va/http.go
|
|
+++ b/va/http.go
|
|
@@ -326,7 +326,16 @@ func (va *ValidationAuthorityImpl) extractRequestTarget(req *http.Request) (stri
|
|
}
|
|
|
|
if _, err := iana.ExtractSuffix(reqHost); err != nil {
|
|
- return "", 0, berrors.ConnectionFailureError("Invalid hostname in redirect target, must end in IANA registered TLD")
|
|
+ isLabca := false
|
|
+ for _, domain := range va.labcaDomains {
|
|
+ if strings.HasSuffix(reqHost, "."+domain) {
|
|
+ isLabca = true
|
|
+ }
|
|
+ }
|
|
+
|
|
+ if !isLabca {
|
|
+ return "", 0, berrors.ConnectionFailureError("Invalid hostname in redirect target, must end in IANA registered TLD")
|
|
+ }
|
|
}
|
|
|
|
return reqHost, reqPort, nil
|