From 2e21973ddf07edaa86584e8270b43efd20f99e4b Mon Sep 17 00:00:00 2001 From: Patrik Kernstock Date: Sun, 17 Oct 2021 16:52:17 +0100 Subject: [PATCH] Disable TXT splitting with OVH provider (#1291) --- providers/ovh/ovhProvider.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/providers/ovh/ovhProvider.go b/providers/ovh/ovhProvider.go index b73c74d5d..8b2c2d976 100644 --- a/providers/ovh/ovhProvider.go +++ b/providers/ovh/ovhProvider.go @@ -8,7 +8,6 @@ import ( "github.com/StackExchange/dnscontrol/v3/models" "github.com/StackExchange/dnscontrol/v3/pkg/diff" - "github.com/StackExchange/dnscontrol/v3/pkg/txtutil" "github.com/StackExchange/dnscontrol/v3/providers" "github.com/ovh/go-ovh/ovh" ) @@ -128,22 +127,6 @@ func (c *ovhProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.C // Normalize models.PostProcessRecords(actual) - txtutil.SplitSingleLongTxt(dc.Records) // Autosplit long TXT records - - // OVH handles DKIM keys differently, no matter if sent to API as TXT or DKIM record type. The OVH expects the DKIM - // string to be in one single string. That's why we'll need to un-split the DKIM TXT records. If not, dnscontrol - // will always detect a mismatch between the unsplitted string from API to the splitted one in dnscontrol. - for _, rc := range dc.Records { - if c.isDKIMRecord(rc) { - // When DKIM records are updated, OVH does special logic in their backend, most likely validating the string. - // Splitting the string causes the validation on the API backend to fail with error message: - // "FAILURE! Error 400: "Invalid subfield found in DKIM : \"v=DKIM1"" - // Therefore, we merge the text string before we compare or send it to the API. - unsplittedTarget := strings.Join(rc.TxtStrings, "") - rc.SetTarget(unsplittedTarget) - rc.SetTargetTXTString(unsplittedTarget) - } - } differ := diff.New(dc) _, create, delete, modify, err := differ.IncrementalDiff(actual)