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:
@@ -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 += "."
|
||||
}
|
||||
|
Reference in New Issue
Block a user