GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — fix: url parser should throw error on invalid ipv4 by anonrig · Pull Request #42915 · nodejs/node Conversation
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@nodejs/url |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It looks like this results in many other tests failing? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @Trott I'm trying to pinpoint the reason behind why the C++ code does not work. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm not terribly familiar with that code or frankly C++ in general, plus I'm kinda occupied with other things right now, but a quick |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
So, the problem was that when the parser saw more than 4 bool is_ipv4; ParseIPv4Host(decoded.c_str(), decoded.length(), &is_ipv4); if (is_ipv4) return; Another big issue is around this line. Since, if parse number fails, it should also return a FAILURE, but before it should define is_ipv4 = true. int64_t n = ParseNumber(mark, pointer); if (n < 0) return; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
test/fixtures/wpt should be updated using https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-wpt
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This will introduce more failing tests. I've opened an additional issue in order to keep track of spec compliance and fix those issues.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@aduh95 can you re-run the failed test? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Microscopic nit-pick on the commit message. Can be ignored (someone can fix it while landing if they feel strongly about it), but FYI for future stuff: First word should be an imperative verb (so an action). Instead of "should validate...", just "validate....". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you @Trott. You're absolutely right! I'll definitely take this feedback into consideration in my next commit. BTW, one of the test always goes to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I haven't looked to see what test you are talking about specifically, but test reliability is definitely an issue we struggle with, so likely a common problem. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: nodejs#42915 Fixes: nodejs#42914 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
|
Landed in 87d0d7a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the contribution! 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @Trott! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR changed quite a lot between the time I reviewed it and the time it landed, and #42915 (comment) looks like a blocker to me. I think we should revert. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This reverts commit 87d0d7a. Refs: nodejs#42915
This reverts commit 87d0d7a. Refs: #42915 PR-URL: #42940 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #42915 Fixes: #42914 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This reverts commit 87d0d7a. Refs: #42915 PR-URL: #42940 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Rich Trott <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
URL parser does not validate ipv4 with more than 4 parts
There was an error while loading. Please reload this page.