Skip to content

Commit ea0c0f0

Browse files
committed
VERCEL: handle more CAA edge case
1 parent c503f6e commit ea0c0f0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

providers/vercel/auditrecords.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package vercel
22

33
import (
4+
"errors"
5+
46
"github.com/StackExchange/dnscontrol/v4/models"
57
"github.com/StackExchange/dnscontrol/v4/pkg/rejectif"
68
)
@@ -25,5 +27,26 @@ func AuditRecords(records []*models.RecordConfig) []error {
2527
// bad_request - Invalid request: missing required property `value`.
2628
a.Add("TXT", rejectif.TxtIsEmpty)
2729

30+
// last verified 2025-11-22
31+
// bad_request - invalid_value - The specified value is not a fully qualified domain name.
32+
a.Add("CAA", rejectif.CaaHasEmptyTarget)
33+
a.Add("CAA", rejectifCaaTargetIsSemicolon)
34+
35+
// last verified 2025-11-22
36+
// Vercel misidentified extra fields in CAA record `0 issue letsencrypt.org; validationmethods=dns-01; accounturi=https://acme-v02.api.letsencrypt.org/acme/acct/1234`
37+
// as "cansignhttpexchanges", and add extra incorrect validation on the value
38+
// let's ignore all whitespace for now, i should report this to Vercel though, as
39+
// it uses NS1 as its provder and NS1 definitly allows it.
40+
//
41+
// invalid_value - Unexpected "cansignhttpexchanges" value.
42+
a.Add("CAA", rejectif.CaaTargetContainsWhitespace)
43+
2844
return a.Audit(records)
2945
}
46+
47+
func rejectifCaaTargetIsSemicolon(rc *models.RecordConfig) error {
48+
if rc.GetTargetField() == ";" {
49+
return errors.New("caa target cannot be ';'")
50+
}
51+
return nil
52+
}

0 commit comments

Comments
 (0)