1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CLOUDFLARE: Bug: crash when SRV is missing target (#1437)

* CLOUDFLARE: Bug: crash when SRV is missing target

* fixup!
This commit is contained in:
Tom Limoncelli
2022-03-03 16:53:54 -05:00
committed by GitHub
parent e2eb288482
commit 619487738f

View File

@@ -627,7 +627,14 @@ func (c *cloudflareProvider) nativeToRecord(domain string, cr cloudflare.DNSReco
}
case "SRV":
data := cr.Data.(map[string]interface{})
target := data["target"].(string)
target := "MISSING.TARGET"
switch data["target"].(type) {
case string:
target = data["target"].(string)
default:
}
if target != "." {
target += "."
}