REFACTOR: CAA/DNSKEY/DS/PopulateFromString and others now use modern methods#4426
Merged
Conversation
Base automatically changed from
release_candidate_v5_bind_domainnames
to
release_candidate_v5
July 5, 2026 21:19
## 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 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
models.backfill()to set legacy fields directly. Do not useSetTarget*()helpers. This prevents accidental infinite recursion.MakeCAA()now validates the tag string.MyNewData()appended wrong domain.models.legacySetTargetArgs()andmodels.legacySetTargetParse()to make it easier to moderizemodels/t_*.gofilesdc.AddTestRCParse()models.t_caa.gomodels/t_dnskey.gomodels/t_ds.got_parse.goto uselegacySetTargetParse()PopulateFromString()to usePopulateFromStringFunc()pkg/diff2/analyze_test.gopkg/diff2/handsoff_test.goto use dnsv2pkg/dnsrr/dnsrr.goto use RecordConfig factories, notSetTarget*()helpers. This prevents accidental infinite recursion.