Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit95d7a75

Browse files
bradh352richardlau
authored andcommitted
test: fix dns test case failures after c-ares update to 1.21.0+
c-ares has made intentional changes to the behavior of TXT recordsto comply with RFC 7208, which concatenates multiple strings forthe same TXT record into a single string. Multiple TXT recordsare not concatenated.Also, response handling has changed, such that a response which iscompletely invalid in formatting is thrown away as a maliciousforged/spoofed packet rather than returning EBADRESP. This is onestep toward RFC 9018 (EDNS COOKIES) which will require the messageto at least be structurally valid to validate against spoofedrecords.Fix By: Brad House (@bradh352)PR-URL:#50743Reviewed-By: Luigi Pinca <luigipinca@gmail.com>Reviewed-By: James M Snell <jasnell@gmail.com>Fixes:#50741Refs:#50444
1 parentcd613e5 commit95d7a75

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎test/parallel/test-dns-resolveany-bad-ancount.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ server.bind(0, common.mustCall(async () => {
3030
dnsPromises.resolveAny('example.org')
3131
.then(common.mustNotCall())
3232
.catch(common.expectsError({
33-
code:'EBADRESP',
33+
// May return EBADRESP or ETIMEOUT
34+
code:/^(?:EBADRESP|ETIMEOUT)$/,
3435
syscall:'queryAny',
3536
hostname:'example.org'
3637
}));
3738

3839
dns.resolveAny('example.org',common.mustCall((err)=>{
39-
assert.strictEqual(err.code,'EBADRESP');
40+
assert.notStrictEqual(err.code,'SUCCESS');
4041
assert.strictEqual(err.syscall,'queryAny');
4142
assert.strictEqual(err.hostname,'example.org');
4243
constdescriptor=Object.getOwnPropertyDescriptor(err,'message');

‎test/parallel/test-dns-resolveany.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const answers = [
1111
{type:'AAAA',address:'::42',ttl:123},
1212
{type:'MX',priority:42,exchange:'foobar.com',ttl:124},
1313
{type:'NS',value:'foobar.org',ttl:457},
14-
{type:'TXT',entries:['v=spf1 ~all','xyz\0foo']},
14+
{type:'TXT',entries:['v=spf1 ~allxyz\0foo']},
1515
{type:'PTR',value:'baz.org',ttl:987},
1616
{
1717
type:'SOA',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp