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

dns.resolveTxt() with multiple strings #52053

Closed
ornotnull opened this issue Mar 12, 2024 · 6 comments
Closed

dns.resolveTxt() with multiple strings #52053

ornotnull opened this issue Mar 12, 2024 · 6 comments
Labels
dns Issues and PRs related to the dns subsystem.

Comments

@ornotnull
Copy link

Version

21.7.0

Platform

Linux server 4.18.0-477.27.1.el8_8.x86_64 #1 SMP Thu Aug 31 10:29:22 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

dns

What steps will reproduce the bug?

dns records in somedomain

test IN TXT 0 string0
test IN TXT 1 string1

the code

import dns from "node:dns/promises"
let t = await dns.resolveTxt("test.somedomain")
console.dir(t)

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

node versions before 21.7.0 return

[ [ '0', 'string0' ], [ '1', 'string1' ] ]

suppose this is the expected behavior

What do you see instead?

versions 21.7.0 and 21.7.1 return

[ [ '0string0' ], [ '1string1' ] ]

looks wrong

Additional information

No response

@marco-ippolito marco-ippolito added the dns Issues and PRs related to the dns subsystem. label Mar 12, 2024
@ornotnull
Copy link
Author

tried to investigate by myself:

this behavior is produced by ares_parse_txt_reply_ext function from cares library

Version 1.20.1 (8 Oct 2023) - this version of cares works well
Version 1.27.0 (22 Feb 2024) - this does not work as expected

going to dig deeper and possible report my finding to c-ares project

@fahrradflucht
Copy link
Contributor

So from the issue you opened in c-ares it sounds like they confirm that there was indeed what can be considered a breaking change.

So probably the c-ares update was not a patch, but a semver major?

@ornotnull
Copy link
Author

Yes, exactly!

Now the branches 18, 20, 21 are affected, tested on v18.20.1, v20.12.1, v21.7.2

@ornotnull
Copy link
Author

the current status:

@RedYetiDev
Copy link
Member

Is this is resolved on the main branch, this issue can be closed.

@ornotnull
Copy link
Author

ornotnull commented Jul 18, 2024

node v20.17.0, v22.5.0 - fixed

affected node versions by this issue:
18: v18.20.0 -
20: v20.12.0 - v20.16.0
21: v21.7.0 - v21.7.3
22: v22.0.0 - v22.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants