Revert "CLOUDFLAREAPI: Fix TXT records with quotes"

This reverts commit c3f52d228a.
This commit is contained in:
Tom Limoncelli 2022-06-16 15:21:45 -04:00
parent c3f52d228a
commit cc0fecf1f7
2 changed files with 4 additions and 4 deletions

View file

@ -42,7 +42,6 @@ func (rc *RecordConfig) PopulateFromString(rtype, contents, origin string) error
case "SOA":
return rc.SetTargetSOAString(contents)
case "SPF", "TXT":
fmt.Printf("DEBUG: popFrmStr txt=%q\n", contents)
return rc.SetTargetTXTString(contents)
case "SRV":
return rc.SetTargetSRVString(contents)

View file

@ -119,7 +119,7 @@ func (c *cloudflareProvider) createRec(rec *models.RecordConfig, domainID string
prio = fmt.Sprintf(" %d ", rec.MxPreference)
}
if rec.Type == "TXT" {
content = rec.GetTargetTXTrfc1035()
content = rec.GetTargetField()
}
if rec.Type == "DS" {
content = fmt.Sprintf("%d %d %d %s", rec.DsKeyTag, rec.DsAlgorithm, rec.DsDigestType, rec.DsDigest)
@ -183,8 +183,9 @@ func (c *cloudflareProvider) modifyRecord(domainID, recID string, proxied bool,
TTL: int(rec.TTL),
}
if rec.Type == "TXT" {
r.Content = rec.GetTargetTXTrfc1035()
fmt.Printf("DEBUG: modifyRecord TXT content = %q\n", r.Content)
if len(rec.TxtStrings) > 1 {
r.Content = `"` + strings.Join(rec.TxtStrings, `" "`) + `"`
}
}
if rec.Type == "SRV" {
r.Data = cfSrvData(rec)