Commit graph

8 commits

Author SHA1 Message Date
Tom Limoncelli
0ae4acc3e4
BUGFIX: BIND %D not working after v4.28.0 (#3900)
# Issue

Fixes https://github.com/StackExchange/dnscontrol/issues/3898

After the v4.28.0 upgrade, the `%D` option in BIND's `"filenameformat"`
option no longer works (returns "") when reading the zonefile (but it
works for writing to one!). As a result, "push" always re-creates the
zonefile even if there are no changes.

# Resolution

Fix `%D` in the zone reading code.
2025-12-08 10:32:07 -05:00
Tom Limoncelli
a0288bd759
bug(split horizon): Domains with split horizons not working (#3895)
Fixes https://github.com/StackExchange/dnscontrol/issues/3894

# Issue

* Split horizon DNS broke in 4.28.0
* Insufficient automated testing to detect this in the future 

# Resolution

* domain.PostProcess() was called twice. The first time the tag was
properly parsed, removing the tag from DomainConfig.Name and putting it
in DomainConfig.Tag. The second time DomainConfig.Name no longer had the
tag and .Tag was set to "".
* The JSON output of DomainConfig doesn't output .UniqueName. If it had,
this bug would have been noticed prior to release. Test updated to
include that field.
2025-12-05 11:41:16 -05:00
Tom Limoncelli
1b2f5d4d34
BUGFIX: IDN support is broken for domain names (#3845)
# Issue

Fixes https://github.com/StackExchange/dnscontrol/issues/3842

CC @das7pad

# Resolution

Convert domain.Name to IDN earlier in the pipeline. Hack the --domains
processing to convert everything to IDN.

* Domain names are now stored 3 ways: The original input from
dnsconfig.js, canonical IDN format (`xn--...`), and Unicode format. All
are downcased. Providers that haven't been updated will receive the IDN
format instead of the original input format. This might break some
providers but only for users with unicode in their D("domain.tld").
PLEASE TEST YOUR PROVIDER.
* BIND filename formatting options have been added to access the new
formats.

# Breaking changes

* BIND zonefiles may change. The default used the name input in the D()
statement. It now defaults to the IDN name + "!tag" if there is a tag.
* Providers that are not IDN-aware may break (hopefully only if they
weren't processing IDN already)

---------

Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2025-11-29 12:17:44 -05:00
Tom Limoncelli
3eddfcd037
feat(validation): Validation errors now include the line number (#3788) 2025-10-10 13:48:41 -04:00
Tom Limoncelli
e9ff430a2b TESTING: parse_tests: reformat/regenerate .js .json files 2025-01-03 13:19:39 -05:00
Tom Limoncelli
513b8be910
CICD: json files should be strictly formatted (#3282) 2025-01-01 12:02:23 -05:00
Tom Limoncelli
dba20387bf
Fix D_EXTEND matching bug (#888)
* Use a standard JSON comparison tool

* Fixes https://github.com/StackExchange/dnscontrol/issues/886

* Delete file in wrong place.

* Remove the need for minify
2020-10-07 16:03:36 -04:00
Tom Limoncelli
b275286dae
Add D_EXTEND (#885) (thanks to @ad8-bdl!)
* fix get-zones code block indentation

* extend D_EXTEND to handle subdomains

* fix targets: make absolute incl. subdomain where necessary

* clarify subdomain target test (not IP && not fqdn)

* Add parse_tests for D and D_EXTEND

* _getDomainObject: examine all domains

* human readable form

* consistent test IP addresses

* Improve docs and formatting

* propagate subdomain to canonicalisation

* en-US spelling

* rm extraneous console.log

* ignore subdomain for CF_REDIRECT

* clarify D_EXTEND doc re. CF_REDIRECT

* rm extraneous linebreak

* _getDomainObject: examine all domains

* human readable form

* consistent test IP addresses

* propagate subdomain to canonicalisation

* en-US spelling

* rm extraneous console.log

* ignore subdomain for CF_REDIRECT

* clarify D_EXTEND doc re. CF_REDIRECT

* rm extraneous linebreak

* GANDI_V5: Use github.com/go-gandi/go-gandi, not github.com/tiramiseb/go-gandi (#883)

* DOCUMENTATION: Fix error in CNAME.md (#877)

The current example `CNAME("def", "test.subdomain"), // def.example.com -> test.subdomain.example.com` is invalid (correctly raises a validation error, "ERROR: in CNAME def.example.com: target (test.subdomain) must end with a (.)")

* typos, fmt; example syntax fixes and real output

* formatting; re-add lost comment

* RecordConfig subdomain should be nullable

* providers/cscglobal/api.go: Fix fmt string

* More tests and docs

* go generate

Co-authored-by: Ben L <47653825+ad8-bdl@users.noreply.github.com>
2020-10-07 14:27:33 -04:00