-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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: crash loading non-standard schemes in iframes #35485
Conversation
71707fa
to
17c4c86
Compare
patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch
Outdated
Show resolved
Hide resolved
17c4c86
to
299c293
Compare
Release Notes Persisted
|
I have automatically backported this PR to "19-x-y", please check out #35515 |
I have automatically backported this PR to "20-x-y", please check out #35516 |
I have automatically backported this PR to "21-x-y", please check out #35517 |
Thank you for doing this! |
Update: I'm still finding (in Electron 21.2.0) that loading a PDF in an iFrame fails to display the PDF, and loading a PDF in a webview crashes Electron. Here's an Electron Fiddle gist that demonstrates this: https://gist.github.com/george-thomas-hill/c3179e6eddeb1a2715201a20dbf95015 Could you please take a look? |
Description of Change
Closes #35462.
Closes #28407.
This fixes a crash that occurs when loading non-standard schemes from iframes. This was happening because
ChildProcessSecurityPolicyImpl::CanAccessDataForOrigin
contains explicit exceptions to allow built-in non-standard schemes, but does not check for non-standard schemes registered by the embedder.Upstream, CRBUG:1081397 contains several paths forward - here I chose to swap out the
CHECK
innavigation_request.cc
frompolicy->CanAccessDataForOrigin
topolicy->CanCommitOriginAndUrl
.CL opened at CL:3856266
Checklist
npm test
passesRelease Notes
Notes: Fixed a crash that occured when loading non-standard schemes from iframes.