Skip to content

Fix absolute host/name domain matching on label boundary (#57) - #58

Merged
pawel-kow merged 3 commits into
masterfrom
test/srv-name-trailing-dot
Sep 29, 2026
Merged

pawel-kow merged 3 commits into
masterfrom
test/srv-name-trailing-dot

Conversation

@pawel-kow

@pawel-kow pawel-kow commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #57.

Problem

An absolute host/name (trailing dot) was matched against the domain as a plain string suffix, so www.notfoo.com. on domain foo.com was accepted and mangled to www.no instead of being rejected. Affected all RR types, including wildcard hosts.

Fix

resolve_variables now strips the domain only on a label boundary ('.' + domain + '.'), in both the regular and the wildcard branch. Names outside the domain fall through to validation and raise InvalidData.

Tests

  • SRV name rendering per spec: empty, relative, absolute (trailing dot), and %fqdn% with/without trailing dot.
  • Absolute names inside the domain but outside host (apex, other host) are placed there; names outside the domain raise InvalidData.
  • Label-boundary regression tests for A (incl. wildcard), AAAA, CNAME, APEXCNAME, TXT, MX, NS, SRV and CAA.

Full suite passes; PR regression check: 971/971 OK.

🤖 Generated with Claude Code

@pawel-kow pawel-kow changed the title Test/srv name trailing dot Fix absolute host/name domain matching on label boundary (#57) Sep 29, 2026
@pawel-kow
pawel-kow merged commit f25ba04 into master Sep 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Absolute host/name ending in domain string but not on a label boundary (e.g. notfoo.com. for foo.com) is accepted and mangled

1 participant