Every time I’ve looked at using Electron I’ve tried to figure out if it can be made secure from RCE in the face of XSS (which is inevitable).
Discord didn’t set contextIsolation to true. Why? No idea. Would it have been enough if they did? No idea.
Discord didn’t set contextIsolation to true. Why? No idea. Would it have been enough if they did? No idea.
Getting everything to work in a context isolated world was a many month effort, which had begun long before this bug was reported to our team.
(The majority of this code was written before context isolation even existed :P)
Our video rendering implementation needed to copy frame buffers to the renderer. Doing this over context bridge would have been quite expensive.
A more ideal approach which the team is working on keeps the buffers on the GPU - which should solve all the performance woes and more.
More on this here: https://www.electronjs.org/docs/api/context-bridge