ReviewOS

also looking at this

stacks/ts-dns

fix: allow underscores in domain labels

#2057
Open lu-zero wants to merge fix/allow-underscores-in-domain-labels into main
2 files +19 -2
9 days ago

Fixes #2056

The domain validation regex rejects underscores, preventing queries for DKIM, DMARC, SRV, and TLSA records which use underscore-prefixed labels (e.g., _dmarc.example.com, selector1._domainkey.example.com).

One-character fix: [a-z0-9-] → [a-z0-9_-] in validateDomainName.

Per RFC 2181 §11, any binary label up to 63 octets is valid in DNS. The no-underscore restriction is a hostname convention (RFC 952), not a DNS protocol requirement.

Added test covering DKIM, DMARC, and SRV domain patterns.

2 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.