Skip to content

panic: short (example.com) is not supposed to end with a dot #3853

@dimejo

Description

@dimejo

Describe the bug
Hetzner creates FQDN entries (e.g. _acme-challenge.www.example.com.) to issue SSL certificates. DNSControl panics when these entries are encountered.

panic: short (_acme-challenge.www.example.com.) is not supposed to end with a dot

goroutine 119 [running]:
github.com/StackExchange/dnscontrol/v4/models.(*RecordConfig).SetLabel(0xc000439a00, {0xc00042cd20, 0x25}, {0xc000b5baf0, 0x10})
        /home/runner/work/dnscontrol/dnscontrol/models/record.go:324 +0x228
github.com/StackExchange/dnscontrol/v4/providers/hetzner.toRecordConfig({0xc000b5baf0, 0x10}, 0xc000100ac8)
        /home/runner/work/dnscontrol/dnscontrol/providers/hetzner/types.go:92 +0x116
github.com/StackExchange/dnscontrol/v4/providers/hetzner.(*hetznerProvider).GetZoneRecords(0x7fe9343943e8?, {0xc000b5baf0, 0x10}, 0xc00007c370?)
        /home/runner/work/dnscontrol/dnscontrol/providers/hetzner/hetznerProvider.go:156 +0x8d
github.com/StackExchange/dnscontrol/v4/pkg/zonerecs.CorrectZoneRecords({0x7fe8ed457e40, 0xc00023a000}, 0xc0002f0280)
        /home/runner/work/dnscontrol/dnscontrol/pkg/zonerecs/zonerecords.go:11 +0x4c
github.com/StackExchange/dnscontrol/v4/commands.generateZoneCorrections(0xc0002f0280, 0xc000bfeb80)
        /home/runner/work/dnscontrol/dnscontrol/commands/ppreviewPush.go:679 +0x3a
github.com/StackExchange/dnscontrol/v4/commands.oneZone(0xc0002f0280, {{{{0x20990b7, 0xc}, {0x0, 0x0}, 0x0, {{...}, {...}, 0x0, 0x0}}, ...}, ...})
        /home/runner/work/dnscontrol/dnscontrol/commands/ppreviewPush.go:517 +0x16f
github.com/StackExchange/dnscontrol/v4/commands.prun.func2(0xc0002f0280, {{{{0x20990b7, 0xc}, {0x0, 0x0}, 0x0, {{...}, {...}, 0x0, 0x0}}, ...}, ...}, ...)
        /home/runner/work/dnscontrol/dnscontrol/commands/ppreviewPush.go:317 +0xa5
created by github.com/StackExchange/dnscontrol/v4/commands.prun in goroutine 1
        /home/runner/work/dnscontrol/dnscontrol/commands/ppreviewPush.go:315 +0xf3d

DNSControl runs without issues after manually removing the TLD part of the entry (_acme-challenge.www.example.com. => _acme-challenge.www).

Expected behavior
Don't panic.

DNS Provider

  • Hetzner v1

Additional context
Related: #2865
Related: #1039

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions