Skip to content

Commit

Permalink
CLOUDFLARE: Bug: crash when SRV is missing target (#1437)
Browse files Browse the repository at this point in the history
* CLOUDFLARE: Bug: crash when SRV is missing target

* fixup!
  • Loading branch information
tlimoncelli committed Mar 3, 2022
1 parent e2eb288 commit 6194877
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion providers/cloudflare/cloudflareProvider.go
Expand Up @@ -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 += "."
}
Expand Down

0 comments on commit 6194877

Please sign in to comment.