Skip to content
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

fix: use non-symbols in isURLInstance check #24831

Merged
merged 1 commit into from Aug 5, 2020
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Aug 4, 2020

Description of Change

Closes #24794.

This slightly changes the conditional used to determine whether or
not something is a URL instance. Since Node.js adds symbols to the URL
not specified by the WHATWG, those symbols are not present in other
implementations (like Blink's) and therefore can cause false negatives.

This fixes that by slightly changing the check to properties present
in all URL instances as specified in the WHATWG spec.

Upstreamed at: nodejs/node#34622.

cc @zcbenz @ckerr @MarshallOfSound

Checklist

Release Notes

Notes: Fixed an issue where some Node.js methods would not work with URL instances constructed in the renderer process.

@codebytere codebytere requested a review from a team as a code owner August 4, 2020 16:33
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 4, 2020
@codebytere codebytere requested a review from zcbenz August 5, 2020 04:22
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 5, 2020
@codebytere codebytere merged commit 6cb23e1 into master Aug 5, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 5, 2020

Release Notes Persisted

Fixed an issue where some Node.js methods would not work with URL instances constructed in the renderer process.

@trop
Copy link
Contributor

trop bot commented Aug 5, 2020

I have automatically backported this PR to "10-x-y", please check out #24860

@trop trop bot removed the target/10-x-y label Aug 5, 2020
@trop
Copy link
Contributor

trop bot commented Aug 5, 2020

I have automatically backported this PR to "8-x-y", please check out #24861

@trop trop bot added the in-flight/10-x-y label Aug 5, 2020
@trop
Copy link
Contributor

trop bot commented Aug 5, 2020

I have automatically backported this PR to "9-x-y", please check out #24862

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cant use WHATWG URL as path for fs functions in the renderer
3 participants