Skip to content

dns.resolveTxt() with multiple strings  #52053

Description

@ornotnull

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

Activity

  1. added
    dnsIssues and PRs related to the dns subsystem.
    on Mar 12, 2024
  2. ornotnull commented on Mar 29, 2024

    @ornotnull
    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

  3. fahrradflucht commented on Apr 9, 2024

    @fahrradflucht
    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?

  4. ornotnull commented on Apr 10, 2024

    @ornotnull
    Author

    Yes, exactly!

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

  5. ornotnull commented on Jul 8, 2024

    @ornotnull
    Author

    the current status:

  6. avivkeller commented on Jul 8, 2024

    @avivkeller
    Member

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

  7. ornotnull commented on Jul 18, 2024

    @ornotnull
    Author

    node v20.17.0, v22.5.0 - fixed

    affected node versions by this issue:
    18: v18.20.0 - v18.20.8
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions