Skip to content

REFACTOR: CAA/DNSKEY/DS/PopulateFromString and others now use modern methods#4426

Merged
TomOnTime merged 30 commits into
release_candidate_v5from
release_candidate_v5_sets
Jul 6, 2026
Merged

REFACTOR: CAA/DNSKEY/DS/PopulateFromString and others now use modern methods#4426
TomOnTime merged 30 commits into
release_candidate_v5from
release_candidate_v5_sets

Conversation

@TomOnTime

@TomOnTime TomOnTime commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator
  • Rewrite models.backfill() to set legacy fields directly. Do not use SetTarget*() helpers. This prevents accidental infinite recursion.
  • MakeCAA() now validates the tag string.
  • BUGFIX: MyNewData() appended wrong domain.
  • Create models.legacySetTargetArgs() and models.legacySetTargetParse() to make it easier to moderize models/t_*.go files
  • Add dc.AddTestRCParse()
  • Moderize models.t_caa.go
  • Moderize models/t_dnskey.go
  • Modernize models/t_ds.go
  • Rewrite t_parse.go to use legacySetTargetParse()
  • Rewrite PopulateFromString() to use PopulateFromStringFunc()
  • Modernize pkg/diff2/analyze_test.go
  • Convert pkg/diff2/handsoff_test.go to use dnsv2
  • Rewrite pkg/dnsrr/dnsrr.go to use RecordConfig factories, not SetTarget*() helpers. This prevents accidental infinite recursion.

Base automatically changed from release_candidate_v5_bind_domainnames to release_candidate_v5 July 5, 2026 21:19
@TomOnTime TomOnTime changed the title REFACTOR: DS now uses new methods REFACTOR: CAA/DNSKEY/DS/PopulateFromString and others now use modern methods Jul 6, 2026
TomOnTime and others added 6 commits July 5, 2026 21:22
## Summary

Fixes the AliDNS audit path for internationalized CNAME targets that
have already been converted to ACE/punycode before `AuditRecords` runs.

AliDNS supports ASCII and Chinese IDN values, but rejects non-Chinese
IDN targets such as `ööö.com.`. During integration testing, that target
reaches the provider audit as `xn--ndaaa.com.`, so the existing
ASCII/Chinese check sees only ASCII and allows it through. The AliDNS
API then rejects the create request with `SubDomainInvalid.Value`.

This changes `targetConstraint` to decode the target with
`idna.ToUnicode` before applying the existing AliDNS string validation.
That preserves support for ASCII and Chinese IDN targets while rejecting
non-Chinese IDN targets during audit, so the integration test is skipped
as provider-unsupported instead of failing at the API call.

related to: #4421

## Tests

```bash
go test ./providers/alidns
go test ./integrationTest -run TestNonExistent -count=0
```
@TomOnTime TomOnTime merged commit ca96ca8 into release_candidate_v5 Jul 6, 2026
4 of 10 checks passed
@TomOnTime TomOnTime deleted the release_candidate_v5_sets branch July 6, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants