Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NS1: update ns1 for new txt handling #2644

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/ns1/auditrecords.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func AuditRecords(records []*models.RecordConfig) []error {
a := rejectif.Auditor{}

a.Add("TXT", rejectif.TxtLongerThan255)
a.Add("TXT", rejectif.TxtIsEmpty)

return a.Audit(records)
}
2 changes: 1 addition & 1 deletion providers/ns1/ns1Provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func buildRecord(recs models.Records, domain string, id string) *dns.Record {
if r.Type == "MX" {
rec.AddAnswer(&dns.Answer{Rdata: strings.Fields(fmt.Sprintf("%d %v", r.MxPreference, r.GetTargetField()))})
} else if r.Type == "TXT" {
rec.AddAnswer(&dns.Answer{Rdata: r.GetTargetTXTSegmented()})
rec.AddAnswer(&dns.Answer{Rdata: []string{r.GetTargetTXTJoined()}})
} else if r.Type == "CAA" {
rec.AddAnswer(&dns.Answer{
Rdata: []string{
Expand Down