Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
lib: fix regular expression to detect / and \#40325
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
fasttime commented Oct 5, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
targos commented Oct 5, 2021
@nodejs/modules |
nodejs-github-bot commented Oct 5, 2021
guybedford left a comment
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.
Many thanks, and apologies for the slip!
nodejs-github-bot commented Oct 5, 2021
bmeck commented Oct 5, 2021
Since |
guybedford commented Oct 5, 2021
@bmeck this code path does apply to data URLs, in that data URLs that contain a percent encoded comma will no longer throw, even if that percent encoding is in the body of the data URL. On the other hand, percent encoded |
bmeck commented Oct 5, 2021
@guybedford my main concern is how: import(`data:text/javascript;x="${encodeURIComponent(',')}",export default 123`);is interpreted and ensuring it works, otherwise we could just leave the |
guybedford commented Oct 5, 2021
@bmeck I believe right now your example would fail across all versions, where this PR fixes that. |
guybedford commented Oct 5, 2021
Ah, I see |
guybedford commented Oct 5, 2021
@bmeck since data URLs definitely never hit this path at all, I don't think there's any test coverage to apply here, are you ok with landing as is to get this fix in? I am working on a PR to clarify the data URL distinction in the spec as well as some other encoding cases. |
bmeck commented Oct 5, 2021
@guybedford yea that is fine, though also note that Blob is up and coming |
nodejs-github-bot commented Oct 20, 2021
PR-URL: nodejs#40325Fixes: nodejs#40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
PR-URL: nodejs#40325Fixes: nodejs#40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
Fixes#40305 PR-URL: #40325 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
Fixes#40305 PR-URL: #40325 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
PR-URL: #40325 Backport-PR-URL: #40564Fixes: #40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
PR-URL: #40325 Backport-PR-URL: #40564Fixes: #40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
Notable changes: - **deps**: upgrade npm to 8.1.2 (npm team) [#40643](#40643) - **deps**: update c-ares to 1.18.1 (Richard Lau) [#40660](#40660) - **doc**: add VoltrexMaster to collaborators (voltrexmaster) [#40566](#40566) - **lib**: fix regular expression to detect \`/\` and \`\\\` (Francesco Trotta) [#40325](#40325) PR-URL: #40974
Notable changes: - **deps**: upgrade npm to 8.1.2 (npm team) [#40643](#40643) - **deps**: update c-ares to 1.18.1 (Richard Lau) [#40660](#40660) - **doc**: add VoltrexMaster to collaborators (voltrexmaster) [#40566](#40566) - **lib**: fix regular expression to detect \`/\` and \`\\\` (Francesco Trotta) [#40325](#40325) PR-URL: #40974
Notable changes: - **deps**: upgrade npm to 8.1.2 (npm team) [#40643](#40643) - **deps**: update c-ares to 1.18.1 (Richard Lau) [#40660](#40660) - **doc**: add VoltrexMaster to collaborators (voltrexmaster) [#40566](#40566) - **lib**: fix regular expression to detect \`/\` and \`\\\` (Francesco Trotta) [#40325](#40325) PR-URL: #40974
PR-URL: #40325 Backport-PR-URL: #40565Fixes: #40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
Notable changes: - **deps**: upgrade npm to 8.1.2 (npm team) [nodejs#40643](nodejs#40643) - **deps**: update c-ares to 1.18.1 (Richard Lau) [nodejs#40660](nodejs#40660) - **doc**: add VoltrexMaster to collaborators (voltrexmaster) [nodejs#40566](nodejs#40566) - **lib**: fix regular expression to detect \`/\` and \`\\\` (Francesco Trotta) [nodejs#40325](nodejs#40325) PR-URL: nodejs#40974
PR-URL: nodejs/node#40325Fixes: nodejs/node#40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
Allow importing from file URLs with encoded commas. Forbid encoded backslashes. Fixes#40305.