Skip to content

Commit c17f659

Browse files
authored
ionos: fix DNS record removal (go-acme#2083)
1 parent c847ac4 commit c17f659

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

providers/dns/ionos/ionos.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"errors"
77
"fmt"
88
"net/http"
9+
"strconv"
910
"strings"
1011
"time"
1112

@@ -171,16 +172,16 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
171172
}
172173

173174
for _, record := range records {
174-
if record.Name == dns01.UnFqdn(info.EffectiveFQDN) && record.Content == info.Value {
175-
err := d.client.RemoveRecord(ctx, zone.ID, record.ID)
175+
if record.Name == dns01.UnFqdn(info.EffectiveFQDN) && record.Content == strconv.Quote(info.Value) {
176+
err = d.client.RemoveRecord(ctx, zone.ID, record.ID)
176177
if err != nil {
177178
return fmt.Errorf("ionos: failed to remove record (zone=%s, record=%s): %w", zone.ID, record.ID, err)
178179
}
179180
return nil
180181
}
181182
}
182183

183-
return nil
184+
return fmt.Errorf("ionos: failed to remove record, record not found (zone=%s, domain=%s, fqdn=%s, value=%s)", zone.ID, domain, info.EffectiveFQDN, info.Value)
184185
}
185186

186187
func findZone(zones []internal.Zone, domain string) *internal.Zone {

0 commit comments

Comments
 (0)