FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: add missing to_ascii method in dns queries by anonrig · Pull Request #48347 · nodejs/node · GitHub

/ node Public

src: add missing to_ascii method in dns queries - #48347

Closed
anonrig wants to merge 1 commit into
nodejs:mainfrom
anonrig:fix-idna-resolution
Closed

src: add missing to_ascii method in dns queries#48347
anonrig wants to merge 1 commit into
nodejs:mainfrom
anonrig:fix-idna-resolution

Conversation

anonrig commented Jun 5, 2023

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run. labels Jun 5, 2023
anonrig added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 5, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 5, 2023

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

anonrig removed the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jun 5, 2023
Comment thread src/cares_wrap.cc
auto wrap = std::make_unique<Wrap>(channel, req_wrap_obj);

node::Utf8Value name(env->isolate(), string);
auto plain_name =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am not sure this code is safe because it appears that temporary objects are created, and they go out of scope. The result of node::Utf8Value is converted to a string_view, but a string_view pointing at what instance? It is unclear to me.

I recommend breaking this down...

Local<String> string = args[1].As<String>();
node::Utf8Value utf8name(env->isolate(), string);
std::string name = ada::idna::to_ascii(utf8name.ToStringView());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@lemire Would you like to takeover this pull request? Unfortunately, I can't complete it soon.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

anonrig commented Jun 5, 2023

Copy link
Copy Markdown
Member Author

Closing in favor of @lemire 's pull request

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test/internet/test-dns-idna2008.js fails

4 participants


Back | FazBrowse Home | New Git URL