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

url: fix remaining calculation by rmisev · Pull Request #15637 · nodejs/node · GitHub

/ node Public

url: fix remaining calculation - #15637

Closed
rmisev wants to merge 1 commit into
nodejs:masterfrom
rmisev:url-fix-remaining
Closed

url: fix remaining calculation#15637
rmisev wants to merge 1 commit into
nodejs:masterfrom
rmisev:url-fix-remaining

Conversation

rmisev commented Sep 27, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

In the current implementation the calculated length exceeds the actual remaining's size and can cause incorrect result. For example:

std::string dest;
PercentDecode("%21", 1, &dest);
// actual: dest == "!"
// expected: dest == "%" (because len is 1)

Related PR: #15593

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

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v4.x whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Sep 27, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

jasnell left a comment

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

LGTM but I'd like @TimothyGu to give it a look

TimothyGu left a comment

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

LGTM. Not sure how the bug got in there in the first place. It's calculated correctly everywhere else in the file.

Copy link
Copy Markdown
Member

jasnell pushed a commit that referenced this pull request Sep 29, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

PR-URL: #15637
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

jasnell commented Sep 29, 2017

Copy link
Copy Markdown
Member

Landed in 09b703b

jasnell closed this Sep 29, 2017
rmisev deleted the url-fix-remaining branch September 29, 2017 18:02
MylesBorins pushed a commit that referenced this pull request Sep 29, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

PR-URL: #15637
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 30, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

PR-URL: nodejs/node#15637
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

PR-URL: #15637
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins mentioned this pull request Oct 3, 2017
MylesBorins pushed a commit that referenced this pull request Oct 3, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

PR-URL: #15637
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this pull request Oct 11, 2017
Fix remaining calculation in the PercentDecode function to match the
definition in URL standard: https://url.spec.whatwg.org/#remaining

PR-URL: #15637
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
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++. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL