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

net: throw error when custom lookup resolves to a non-string address #57192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

geeksilva97
Copy link
Contributor

@geeksilva97 geeksilva97 commented Feb 24, 2025

Fixes: #57112

This PR fixes the crash when the lookup function resolves to a non-string address. Instead, it will throw an ERR_INVALID_IP_ADDRESS error.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Feb 24, 2025
@geeksilva97 geeksilva97 marked this pull request as ready for review February 24, 2025 03:57
@geeksilva97 geeksilva97 changed the title net: throw error when custom lookup resolves a non-string address net: throw error when custom lookup resolves to a non-string address Feb 24, 2025
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.36%. Comparing base (772c609) to head (ad678b9).
Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #57192   +/-   ##
=======================================
  Coverage   90.36%   90.36%           
=======================================
  Files         629      629           
  Lines      184308   184403   +95     
  Branches    36010    36033   +23     
=======================================
+ Hits       166544   166633   +89     
- Misses      10910    10911    +1     
- Partials     6854     6859    +5     
Files with missing lines Coverage Δ
lib/net.js 94.95% <100.00%> (+0.11%) ⬆️

... and 35 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssertionError: args[1]->IsString() when custom DNS lookup callback returns array instead of string
3 participants