GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — url, i18n: update IDNA handling by TimothyGu · Pull Request #13362 · nodejs/node

Conversation

@TimothyGu

@TimothyGu TimothyGu commented Jun 1, 2017

Copy link
Copy Markdown
Member

The PR is still somewhat of a WIP, as a proof-of-concept that the proposed changes to the URL Standard work (whatwg/url#309).

Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976

/cc @domenic @zimbabao

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

url

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@TimothyGu
TimothyGu requested review from jasnell, srl295 and watilde June 1, 2017 06:38
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. i18n-api Issues and PRs related to Node.js internationalization support. labels Jun 1, 2017
@TimothyGu TimothyGu mentioned this pull request Jun 1, 2017
Address several IDNA issues whatwg/url#309
Merged
refack
refack reviewed Jun 1, 2017
View reviewed changes
Comment thread src/node_i18n.cc Outdated

@refack refack Jun 1, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nit: align white space in comment?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@TimothyGu TimothyGu Jun 3, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It was intended to be a continuation of the previous line due to the line length lint rule, thus indented.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@refack refack Jun 3, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ack

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
refack
refack approved these changes Jun 1, 2017
View reviewed changes

@refack refack left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM % nit and a non-blocking request

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/node_i18n.cc Outdated

@refack refack Jun 1, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

👍 love the comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/node_i18n.cc Outdated

@refack refack Jun 1, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

[question] AFAICT this is the only call to the workhorse ToASCII, so why implement IDNA_STRICT? Future proofing?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@refack refack Jun 1, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

So since it's not exposed maybe add a test case for IDNA_STRICT in test/cctest/test_url.cc

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@TimothyGu TimothyGu Jun 3, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The strict mode corresponds to beStrict variable in the algorithm. I'll make a mention of this in the code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@refack refack Jun 3, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

[follow up]so in the current implementation IDNA_STRICT exists only in the sense that !IDNA_STRICT <=> IDNA_DEFAULT || IDNA_LENIENT?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@zimbabao

zimbabao commented Jun 1, 2017

Copy link
Copy Markdown
Contributor

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

watilde
watilde approved these changes Jun 1, 2017
View reviewed changes

@watilde watilde left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM so far. Let's wait till upstream gets merge the PRs :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jasnell
jasnell approved these changes Jun 1, 2017
View reviewed changes
@TimothyGu
TimothyGu force-pushed the url-idna branch from 8ff7b39 to bfd903e Compare June 3, 2017 03:25
@TimothyGu

TimothyGu commented Jun 3, 2017

Copy link
Copy Markdown
Member Author

Rebased, @refack's comment addressed. The upstream PRs were landed so this should be good to go.

CI: https://ci.nodejs.org/job/node-test-pull-request/8450/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu
TimothyGu force-pushed the url-idna branch from bfd903e to 6f75b9c Compare June 4, 2017 05:18
@TimothyGu

TimothyGu commented Jun 4, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Redundant test cases removed. One last CI: https://ci.nodejs.org/job/node-test-pull-request/8466/ https://ci.nodejs.org/job/node-test-pull-request/8525/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu
url: update IDNA handling
48dc28e
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
@TimothyGu
TimothyGu force-pushed the url-idna branch from 6f75b9c to 48dc28e Compare June 7, 2017 05:09
@TimothyGu

TimothyGu commented Jun 7, 2017

Copy link
Copy Markdown
Member Author

Landed in 91a1bbe.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu TimothyGu closed this Jun 7, 2017
@TimothyGu
TimothyGu deleted the url-idna branch June 7, 2017 06:36
TimothyGu added a commit to TimothyGu/node that referenced this pull request Jun 7, 2017
@TimothyGu
url: update IDNA handling
91a1bbe
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

PR-URL: nodejs#13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
jasnell pushed a commit that referenced this pull request Jun 7, 2017
@TimothyGu @jasnell
url: update IDNA handling
ba817d3
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

PR-URL: #13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
Auditing for 6.11.1 nodejs/Release#230
Closed
2 of 3 tasks
@MylesBorins MylesBorins added the dont-land-on-v6.x label Jul 17, 2017
@MylesBorins

MylesBorins commented Jul 17, 2017

Copy link
Copy Markdown
Contributor

This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace do-not-land if it is being backported

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TimothyGu

TimothyGu commented Jul 18, 2017

Copy link
Copy Markdown
Member Author

dont-land is okay for this one, as the WHATWG URL parser is not in v6.x.

jasnell reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TimothyGu added a commit to TimothyGu/node that referenced this pull request Nov 28, 2017
@TimothyGu
url: update IDNA handling
79147ae
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

PR-URL: nodejs#13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
@TimothyGu TimothyGu mentioned this pull request Nov 28, 2017
Backport WHATWG URL to 6.x #17365
Closed
4 tasks done
MylesBorins pushed a commit that referenced this pull request Jan 18, 2018
@TimothyGu @MylesBorins
url: update IDNA handling
5a13d1a
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

Backport-PR-URL: #17365
PR-URL: #13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2018
v6.13.0 proposal #18342
Merged
MylesBorins pushed a commit that referenced this pull request Feb 11, 2018
@TimothyGu @MylesBorins
url: update IDNA handling
4d73c47
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

Backport-PR-URL: #17365
PR-URL: #13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 12, 2018
@TimothyGu @MylesBorins
url: update IDNA handling
dc1607b
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

Backport-PR-URL: #17365
PR-URL: #13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 13, 2018
@TimothyGu @MylesBorins
url: update IDNA handling
60b10f0
Remove custom tests for invalid IDNA domains in url-idna.js in favor of
the more comprehensive official set.

Backport-PR-URL: #17365
PR-URL: #13362
Refs: whatwg/url#309
Refs: web-platform-tests/wpt#5976
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
@aliscco aliscco mentioned this pull request Apr 27, 2023
[Snyk] Fix for 30 vulnerabilities aliscco/alisco-node#279
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@watilde watilde watilde approved these changes
@srl295 srl295 Awaiting requested review from srl295
+1 more reviewer
@refack refack refack approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. i18n-api Issues and PRs related to Node.js internationalization support.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@TimothyGu @zimbabao @MylesBorins @refack @jasnell @watilde @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.