| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@nodejs/modules |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Many thanks, and apologies for the slip!
Sorry, something went wrong.
Sorry, something went wrong.
|
Since , is significant for data: we should add a test for that as well even if this codepath doesn't cover data: normally I could foresee a refactor accidentally mixing the 2. |
Sorry, something went wrong.
|
@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 / and \\ in any position of a data URL, including the body, will always throw. One option here could be to separately special case data URLs in opting out of these validations for the body of the data URL. I think that should be a separate PR though. |
Sorry, something went wrong.
|
@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 , in the regexp in this PR rather than removing it if we just want to fix the slashes. I'd prefer we have a test for the data: impact if we change its behavior. |
Sorry, something went wrong.
|
@bmeck I believe right now your example would fail across all versions, where this PR fixes that. |
Sorry, something went wrong.
|
Ah, I see data: URLs have an early exit higher up in the resolver so don't hit this path. We should codify that into the spec as well, will post a PR. |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
@guybedford yea that is fine, though also note that Blob is up and coming |
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: nodejs#40325 Fixes: nodejs#40305 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: #40325 Backport-PR-URL: #40564 Fixes: #40305 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: #40325 Backport-PR-URL: #40564 Fixes: #40305 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
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: #40565 Fixes: #40305 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
PR-URL: nodejs/node#40325 Fixes: nodejs/node#40305 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
| Back | FazBrowse Home | New Git URL |
Allow importing from file URLs with encoded commas. Forbid encoded backslashes. Fixes #40305.