-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
feat: add senderIsMainFrame
to messages sent via ipcRenderer.sendTo()
#38868
Conversation
isMainFrame
to events sent via ipcRenderer.sendTo()
isMainFrame
to IPCs sent via ipcRenderer.sendTo()
isMainFrame
to IPCs sent via ipcRenderer.sendTo()
isMainFrame
to messages sent via ipcRenderer.sendTo()
6a8554f
to
475c2ae
Compare
@miniak given we've now moved towards deprecating |
@codebytere yes it's a simple change that covers existing releases that can be backported |
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.
API LGTM
…end-to-is-main-frame
isMainFrame
to messages sent via ipcRenderer.sendTo()
senderIsMainFrame
to messages sent via ipcRenderer.sendTo()
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.
API LGTM
Release Notes Persisted
|
…o()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: Milan Burda <milan.burda@gmail.com>
…o()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: Milan Burda <milan.burda@gmail.com>
…o()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: Milan Burda <milan.burda@gmail.com>
I have automatically backported this PR to "26-x-y", please check out #39206 |
I have automatically backported this PR to "24-x-y", please check out #39207 |
I have automatically backported this PR to "25-x-y", please check out #39208 |
…o()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: Milan Burda <milan.burda@gmail.com>
…o()` (#39207) * feat: add `senderIsMainFrame` to messages sent via `ipcRenderer.sendTo()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: Milan Burda <milan.burda@gmail.com> * once -> emittedOnce --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda <milan.burda@gmail.com>
…o()` (#39208) feat: add `senderIsMainFrame` to messages sent via `ipcRenderer.sendTo()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda <milan.burda@gmail.com>
…o()` (#39206) feat: add `senderIsMainFrame` to messages sent via `ipcRenderer.sendTo()` (#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Milan Burda <milan.burda@gmail.com>
…o()` (electron#38868) * feat: add isMainFrame to events emitted via ipcRenderer.sendTo() * chore: rename isMainFrame to senderIsMainFrame
Description of Change
When
nodeIntegrationInSubFrames
is enabled in the originatingwebContents
, a child frame with a different origin is able to send an IPC viaipcRenderer.sendTo()
and the receiver has currently no way of telling whether the IPC came from the main frame or not.The question is also whether
ipcRenderer.sendTo
shouldn't be deprecated as it can be replaced withMessageChannel
+ipcRenderer.postMessage()
, where the validation can be done in the main process before passing theMessagePort
to the other renderer.cc @electron/wg-security
Checklist
npm test
passesRelease Notes
Notes: Added
senderIsMainFrame
to messages sent viaipcRenderer.sendTo()