Files
labca/patches/va_http.patch
2025-03-13 21:20:26 +01:00

23 lines
776 B
Diff

diff --git a/va/http.go b/va/http.go
index 04b119ca2..de9e439a5 100644
--- a/va/http.go
+++ b/va/http.go
@@ -338,7 +338,16 @@ func (va *ValidationAuthorityImpl) extractRequestTarget(req *http.Request) (iden
}
if _, err := iana.ExtractSuffix(reqHost); err != nil {
- return identifier.ACMEIdentifier{}, 0, berrors.ConnectionFailureError("Invalid host 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 identifier.ACMEIdentifier{}, 0, berrors.ConnectionFailureError("Invalid host in redirect target, must end in IANA registered TLD")
+ }
}
return identifier.NewDNS(reqHost), reqPort, nil