From 6e96b769020d7146ea35562a702007cb71f1547d Mon Sep 17 00:00:00 2001 From: Matteo Trubini <7964032+matteotrubini@users.noreply.github.com> Date: Wed, 21 May 2025 21:53:06 +0200 Subject: [PATCH 1/2] DOCS: Add Porkbun as supported registrar and update usage examples (#3578) --- README.md | 1 + documentation/provider/porkbun.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d2410bf47..507558806 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Currently supported Domain Registrars: - Name.com - OpenSRS - OVH +- Porkbun - Realtime Register At Stack Overflow, we use this system to manage hundreds of domains diff --git a/documentation/provider/porkbun.md b/documentation/provider/porkbun.md index e16284229..00f3c22ac 100644 --- a/documentation/provider/porkbun.md +++ b/documentation/provider/porkbun.md @@ -23,14 +23,27 @@ This provider does not recognize any special metadata fields unique to Porkbun. ## Usage -An example configuration: +An example configuration: (DNS hosted with Porkbun): {% code title="dnsconfig.js" %} ```javascript -var REG_NONE = NewRegistrar("none"); +var REG_PORKBUN = NewRegistrar("porkbun"); var DSP_PORKBUN = NewDnsProvider("porkbun"); -D("example.com", REG_NONE, DnsProvider(DSP_PORKBUN), +D("example.com", REG_PORKBUN, DnsProvider(DSP_PORKBUN), + A("test", "1.2.3.4"), +); +``` +{% endcode %} + +An example configuration: (Registrar only. DNS hosted elsewhere) + +{% code title="dnsconfig.js" %} +```javascript +var REG_PORKBUN = NewRegistrar("porkbun"); +var DSP_R53 = NewDnsProvider("r53"); + +D("example.com", REG_PORKBUN, DnsProvider(DSP_R53), A("test", "1.2.3.4"), ); ``` From cdbd54016f93140548d846842b0d7575603069c8 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Thu, 22 May 2025 11:09:49 -0400 Subject: [PATCH 2/2] GANDI_V5: BUGFIX: Uppercase labels fail to update (#3582) --- providers/gandiv5/gandi_v5Provider.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/providers/gandiv5/gandi_v5Provider.go b/providers/gandiv5/gandi_v5Provider.go index c1f086b46..4816610bc 100644 --- a/providers/gandiv5/gandi_v5Provider.go +++ b/providers/gandiv5/gandi_v5Provider.go @@ -254,14 +254,25 @@ func (client *gandiv5Provider) GetZoneRecordsCorrections(dc *models.DomainConfig case diff2.CHANGE: msgs := strings.Join(inst.Msgs, "\n") domain := dc.Name - label := inst.Key.NameFQDN - shortname := dnsutil.TrimDomainName(label, dc.Name) + // DNSControl attempts to lowercase all labels (See Opinion #4 in + // https://docs.dnscontrol.org/developer-info/opinions). + + // Sadly, the Gandi API has a bug (I consider it a bug) that to update the + // records at a particular label, the request must specify the label with the + // same case as what is stored at Gandi. In other words, the update API does + // not use a case-insensitive comparison when looking up the label being + // updated. + + // Luckily we save the record as it came from the API in + // `.Original`. We can use that to gurantee we specify the label + // with the case that Gandi is expecting. + originalRrsetName := inst.Old[0].Original.(livedns.DomainRecord).RrsetName ns := recordsToNative(inst.New, dc.Name) corrections = append(corrections, &models.Correction{ Msg: msgs, F: func() error { - res, err := g.UpdateDomainRecordsByName(domain, shortname, ns) + res, err := g.UpdateDomainRecordsByName(domain, originalRrsetName, ns) if err != nil { return fmt.Errorf("%+v ret=%03d: %w", res, res.Code, err) }