mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
fixup!
This commit is contained in:
@ -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)
|
printer.Warnf("Gandi does not support ttls > 30 days. Setting %s from %d to 2592000\n", rec.GetLabelFQDN(), rec.TTL)
|
||||||
rec.TTL = 2592000
|
rec.TTL = 2592000
|
||||||
}
|
}
|
||||||
if rec.Type == "TXT" {
|
// if rec.Type == "TXT" {
|
||||||
rec.SetTarget("\"" + rec.GetTargetField() + "\"") // FIXME(tlim): Should do proper quoting.
|
// rec.SetTarget("\"" + rec.GetTargetField() + "\"") // FIXME(tlim): Should do proper quoting.
|
||||||
}
|
// }
|
||||||
if rec.Type == "NS" && rec.GetLabel() == "@" {
|
if rec.Type == "NS" && rec.GetLabel() == "@" {
|
||||||
if !strings.HasSuffix(rec.GetTargetField(), ".gandi.net.") {
|
if !strings.HasSuffix(rec.GetTargetField(), ".gandi.net.") {
|
||||||
printer.Warnf("Gandi does not support changing apex NS records. Ignoring %s\n", rec.GetTargetField())
|
printer.Warnf("Gandi does not support changing apex NS records. Ignoring %s\n", rec.GetTargetField())
|
||||||
|
@ -216,13 +216,11 @@ func checkRecords(records models.Records) error {
|
|||||||
// TODO(tlim) Remove this function. auditrecords.go takes care of this now.
|
// TODO(tlim) Remove this function. auditrecords.go takes care of this now.
|
||||||
for _, r := range records {
|
for _, r := range records {
|
||||||
if r.Type == "TXT" {
|
if r.Type == "TXT" {
|
||||||
for _, target := range r.GetTargetTXTSegmented() {
|
if strings.ContainsAny(r.GetTargetTXTJoined(), "`") {
|
||||||
if strings.ContainsAny(target, "`") {
|
|
||||||
return fmt.Errorf("INWX TXT records do not support single-quotes in their target")
|
return fmt.Errorf("INWX TXT records do not support single-quotes in their target")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user