Skip to content

dns: invalid TXT response #30688

@reklatsmasters

Description

@reklatsmasters
  • Version: checked in 12.13.0
  • Platform: all?
  • Subsystem: dns

Let's look at QUAD9 dnscrypt certificate using dig:

$ dig @9.9.9.10 2.dnscrypt-cert.quad9.net TXT -p 8443 +short
"DNSC\000\001\000\000\246}Y\184\001+\209$!\177)1A7\214\026\219 \145p\252R1\013\213l\003\004+s;\012\165<\005;\002X\155\156T\228\158\0073C\\`\244#\179\158#T\196\030\207\244\138\209\167\020\254\005g\254If`Tz\171\139\182\225mr\180\021*\190l\170!!\155Di\251\144\228\131cA|Rg\254If`Tz\171xW\215l\\v\149I^Z\251\000"

and using nodejs:

const dns = require('dns');

dns.setServers(['9.9.9.10:8443']);
dns.resolveTxt('2.dnscrypt-cert.quad9.net', (err, record) => {
  console.log(err, record); // null [ [ 'DNSC' ] ]
});

Nodejs should return the whole buffer instead of a C string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions