1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
This commit is contained in:
Tom Limoncelli
2023-11-18 20:57:03 -05:00
parent 3b17df69bb
commit d41503f0a5
2 changed files with 5 additions and 7 deletions

View File

@ -176,9 +176,9 @@ func PrepDesiredRecords(dc *models.DomainConfig) {
printer.Warnf("Gandi does not support ttls > 30 days. Setting %s from %d to 2592000\n", rec.GetLabelFQDN(), rec.TTL)
rec.TTL = 2592000
}
if rec.Type == "TXT" {
rec.SetTarget("\"" + rec.GetTargetField() + "\"") // FIXME(tlim): Should do proper quoting.
}
// if rec.Type == "TXT" {
// rec.SetTarget("\"" + rec.GetTargetField() + "\"") // FIXME(tlim): Should do proper quoting.
// }
if rec.Type == "NS" && rec.GetLabel() == "@" {
if !strings.HasSuffix(rec.GetTargetField(), ".gandi.net.") {
printer.Warnf("Gandi does not support changing apex NS records. Ignoring %s\n", rec.GetTargetField())

View File

@ -216,10 +216,8 @@ func checkRecords(records models.Records) error {
// TODO(tlim) Remove this function. auditrecords.go takes care of this now.
for _, r := range records {
if r.Type == "TXT" {
for _, target := range r.GetTargetTXTSegmented() {
if strings.ContainsAny(target, "`") {
return fmt.Errorf("INWX TXT records do not support single-quotes in their target")
}
if strings.ContainsAny(r.GetTargetTXTJoined(), "`") {
return fmt.Errorf("INWX TXT records do not support single-quotes in their target")
}
}
}