@@ -138,17 +138,12 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
138138 return fmt .Errorf ("active24: could not find zone for domain %q: %w" , domain , err )
139139 }
140140
141- subDomain , err := dns01 .ExtractSubDomain (info .EffectiveFQDN , authZone )
142- if err != nil {
143- return fmt .Errorf ("active24: %w" , err )
144- }
145-
146141 serviceID , err := d .findServiceID (ctx , dns01 .UnFqdn (authZone ))
147142 if err != nil {
148143 return fmt .Errorf ("active24: find service ID: %w" , err )
149144 }
150145
151- recordID , err := d .findRecordID (ctx , strconv .Itoa (serviceID ), subDomain , info )
146+ recordID , err := d .findRecordID (ctx , strconv .Itoa (serviceID ), info )
152147 if err != nil {
153148 return fmt .Errorf ("active24: find record ID: %w" , err )
154149 }
@@ -188,9 +183,9 @@ func (d *DNSProvider) findServiceID(ctx context.Context, domain string) (int, er
188183 return 0 , fmt .Errorf ("service not found for domain: %s" , domain )
189184}
190185
191- func (d * DNSProvider ) findRecordID (ctx context.Context , serviceID , subDomain string , info dns01.ChallengeInfo ) (int , error ) {
186+ func (d * DNSProvider ) findRecordID (ctx context.Context , serviceID string , info dns01.ChallengeInfo ) (int , error ) {
192187 filter := internal.RecordFilter {
193- Name : subDomain ,
188+ Name : dns01 . UnFqdn ( info . EffectiveFQDN ) ,
194189 Type : []string {"TXT" },
195190 Content : info .Value ,
196191 }
@@ -201,14 +196,11 @@ func (d *DNSProvider) findRecordID(ctx context.Context, serviceID, subDomain str
201196 }
202197
203198 for _ , record := range records {
204- // TODO only for debug
205- fmt .Printf ("type: %s, name: %s, content: %s (%s, %s)" , record .Type , record .Name , record .Content , subDomain , info .Value )
206-
207199 if record .Type != "TXT" {
208200 continue
209201 }
210202
211- if record .Name != subDomain {
203+ if record .Name != dns01 . UnFqdn ( info . EffectiveFQDN ) {
212204 continue
213205 }
214206
0 commit comments