Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This fixes TXT resolution by combining broken-up TXT records #181

Merged
merged 3 commits into from May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions client.go
Expand Up @@ -656,9 +656,9 @@ func (d *DNSData) ParseFromRR(rrs []dns.RR) error {
case *dns.CAA:
d.CAA = append(d.CAA, trimChars(recordType.Value))
case *dns.TXT:
for _, txt := range recordType.Txt {
d.TXT = append(d.TXT, trimChars(txt))
}
// Per RFC 7208, a single TXT record can be broken up into multiple parts and "MUST be treated as if those strings are concatenated
// together without adding spaces"; see: https://www.rfc-editor.org/rfc/rfc7208
d.TXT = append(d.TXT, strings.Join(recordType.Txt, ""))
case *dns.SRV:
d.SRV = append(d.SRV, trimChars(recordType.Target))
case *dns.AAAA:
Expand Down