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: emit IPC event in correct context if isolation and sandbox enabled #16352

Merged
merged 2 commits into from Jan 12, 2019
Merged

fix: emit IPC event in correct context if isolation and sandbox enabled #16352

merged 2 commits into from Jan 12, 2019

Conversation

aegarbutt
Copy link
Contributor

Description of Change

IPC events were not being delivered to renderer processes when both
contextIsolation and sandbox were enabled. This is because the
AtomSandboxedRenderFrameObserver class was incorrectly using the
MainWorldScriptContext, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes #11922

cc @miniak

Checklist

Release Notes

Notes: Fixed delivery of IPC events to renderer processes when both contextIsolation and sandbox are enabled.

Alex Garbutt added 2 commits January 10, 2019 11:02
IPC events were not being delivered to renderer processes when both
`contextIsolation` and `sandbox` were enabled. This is because the
`AtomSandboxedRenderFrameObserver` class was incorrectly using the
`MainWorldScriptContext`, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes #11922
@aegarbutt aegarbutt requested a review from a team January 10, 2019 19:04
@aegarbutt
Copy link
Contributor Author

I made a mess of #16330, so I'm trying again here. I included your recommended test changes.

Thank you for your patience with me.

@miniak
Copy link
Contributor

miniak commented Jan 10, 2019

@nornagon, @codebytere can you please review? This is fixing quite a bad bug.

@miniak miniak self-assigned this Jan 11, 2019
@alexeykuzmin alexeykuzmin merged commit dcb670f into electron:master Jan 12, 2019
@release-clerk
Copy link

release-clerk bot commented Jan 12, 2019

Release Notes Persisted

Fixed delivery of IPC events to renderer processes when both contextIsolation and sandbox are enabled.

@welcome
Copy link

welcome bot commented Jan 12, 2019

Congrats on merging your first pull request! 🎉🎉🎉

@trop
Copy link
Contributor

trop bot commented Jan 12, 2019

I have automatically backported this PR to "4-0-x", please check out #16376

akisctx pushed a commit to akisctx/electron that referenced this pull request Jan 22, 2019
…ed (electron#16352)

* fix: emit IPC event in correct context if isolation and sandbox enabled

IPC events were not being delivered to renderer processes when both
`contextIsolation` and `sandbox` were enabled. This is because the
`AtomSandboxedRenderFrameObserver` class was incorrectly using the
`MainWorldScriptContext`, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes electron#11922
@miniak
Copy link
Contributor

miniak commented Jun 6, 2019

/trop run backport-to 3-1-x

@trop
Copy link
Contributor

trop bot commented Jun 6, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "3-1-x" here we go! :D

@trop
Copy link
Contributor

trop bot commented Jun 6, 2019

I was unable to backport this PR to "3-1-x" cleanly;
you will need to perform this backport manually.

miniak pushed a commit that referenced this pull request Jun 6, 2019
…ed (#16352)

* fix: emit IPC event in correct context if isolation and sandbox enabled

IPC events were not being delivered to renderer processes when both
`contextIsolation` and `sandbox` were enabled. This is because the
`AtomSandboxedRenderFrameObserver` class was incorrectly using the
`MainWorldScriptContext`, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes #11922
miniak pushed a commit that referenced this pull request Jun 6, 2019
…ed (#16352)

* fix: emit IPC event in correct context if isolation and sandbox enabled

IPC events were not being delivered to renderer processes when both
`contextIsolation` and `sandbox` were enabled. This is because the
`AtomSandboxedRenderFrameObserver` class was incorrectly using the
`MainWorldScriptContext`, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes #11922
@trop
Copy link
Contributor

trop bot commented Jun 6, 2019

A maintainer has manually backported this PR to "3-1-x", please check out #18668

ckerr pushed a commit that referenced this pull request Jun 6, 2019
…ed (#16352) (#18668)

* fix: emit IPC event in correct context if isolation and sandbox enabled

IPC events were not being delivered to renderer processes when both
`contextIsolation` and `sandbox` were enabled. This is because the
`AtomSandboxedRenderFrameObserver` class was incorrectly using the
`MainWorldScriptContext`, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes #11922
@sofianguy sofianguy added this to Fixed (3.1.11) in 3.0.x / 3.1.x Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3.0.x / 3.1.x
Fixed (3.1.11)
Development

Successfully merging this pull request may close these issues.

Some ipc messages are not sent when contextIsolation and sandbox are set to true
5 participants