Commit 6d2074b
authored
INWX: Bugfix: NAMESERVER() should replace registrar list, not merge into it (#4052)
## Summary
Fixes the INWX registrar provider to replace nameservers instead of
merging existing and desired nameservers.
## Problem
The `GetRegistrarCorrections()` function was merging the currently
registered nameservers with the desired nameservers from the
configuration. This caused nameserver updates to fail when migrating a
domain from one DNS provider to another.
Example failure:
Update nameservers arely.ns.cloudflare.com,pablo.ns.cloudflare.com ->
arely.ns.cloudflare.com,ns.inwx.de,ns2.inwx.de,ns3.inwx.eu,pablo.ns.cloudflare.com
FAILURE! (2306)
## Solution
Changed the logic to use only the configured nameservers
(`dc.Nameservers`) instead of creating a union with the existing
registrar nameservers.
### Before
```go
combined := map[string]bool{}
for _, ns := range dc.Nameservers {
combined[ns.Name] = true
}
for _, rs := range regNameservers {
combined[rs] = true
}
```
### After
```go
var expected []string
for _, ns := range dc.Nameservers {
expected = append(expected, ns.Name)
}
```1 parent 47866f9 commit 6d2074b
1 file changed
+4
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
471 | 464 | | |
472 | 465 | | |
| 466 | + | |
473 | 467 | | |
474 | 468 | | |
475 | 469 | | |
| |||
0 commit comments