Skip to content

fix(dns): support quoted strings, null MX, wildcards, and modern RR t… - #1531

Merged
github-actions[bot] merged 1 commit into
alecthomas:masterfrom
delphij:bugfix-dnszone
Nov 22, 2026
Merged

github-actions[bot] merged 1 commit into
alecthomas:masterfrom
delphij:bugfix-dnszone

Conversation

@delphij

@delphij delphij commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

…ypes

Improve the DNS zone file lexer (lexers/embedded/dns.xml) to handle standard RFC constructs without emitting Error tokens:

  • Match double-quoted character-strings before ';' comments (RFC 1035 §5.1) so TXT/CAA values and embedded semicolons (SPF/DMARC/DKIM) are tokenized as strings rather than errors/comments.
  • Recognize standalone root '.' for Null MX (RFC 7505 §3) and HTTPS/SVCB alias form (RFC 9460).
  • Support wildcard ('') and underscore labels (RFC 4592, RFC 8552) such as '._domainkey', '_dmarc', '_443._tcp', and '_submission._tcp'.
  • Stop consuming trailing whitespace in FQDN matches so adjacent FQDNs are tokenized separately.
  • Add modern RR types and classes (CH, HS, CSYNC, HINFO, HTTPS, OPENPGPKEY, SMIMEA, SVCB, URI, ZONEMD), SVCB/HTTPS SvcParam key=value syntax, base64/hex RDATA, and seconds/compound BIND TTL durations.

…ypes

Improve the DNS zone file lexer (lexers/embedded/dns.xml) to handle standard RFC constructs without emitting Error tokens:

- Match double-quoted character-strings before ';' comments (RFC 1035 §5.1) so TXT/CAA values and embedded semicolons (SPF/DMARC/DKIM) are tokenized as strings rather than errors/comments.
- Recognize standalone root '.' for Null MX (RFC 7505 §3) and HTTPS/SVCB alias form (RFC 9460).
- Support wildcard ('*') and underscore labels (RFC 4592, RFC 8552) such as '*._domainkey', '_dmarc', '_443._tcp', and '_submission._tcp'.
- Stop consuming trailing whitespace in FQDN matches so adjacent FQDNs are tokenized separately.
- Add modern RR types and classes (CH, HS, CSYNC, HINFO, HTTPS, OPENPGPKEY, SMIMEA, SVCB, URI, ZONEMD), SVCB/HTTPS SvcParam key=value syntax, base64/hex RDATA, and seconds/compound BIND TTL durations.
@github-actions
github-actions Bot enabled auto-merge (squash) November 22, 2026 18:31
@github-actions
github-actions Bot merged commit 561beaa into alecthomas:master Nov 22, 2026
4 checks passed
@delphij
delphij deleted the bugfix-dnszone branch November 22, 2026 20:15
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.

1 participant