Don't pass preloadPath via ELECTRON_BROWSER_SANDBOX_LOAD for security reasons (#13031) (#14026)

This commit is contained in:
Milan Burda 2018-08-11 19:53:33 +02:00 committed by Charles Kerr
parent fb2afe8656
commit b5bfd9867b
8 changed files with 55 additions and 24 deletions

View file

@ -1,5 +1,5 @@
/* eslint no-eval: "off" */
/* global binding, preloadPath, Buffer */
/* global binding, Buffer */
const events = require('events')
const electron = require('electron')
@ -37,7 +37,7 @@ const loadedModules = new Map([
const {
preloadSrc, preloadError, webContentsId, platform, env
} = electron.ipcRenderer.sendSync('ELECTRON_BROWSER_SANDBOX_LOAD', preloadPath)
} = electron.ipcRenderer.sendSync('ELECTRON_BROWSER_SANDBOX_LOAD')
Object.defineProperty(process, 'webContentsId', {
configurable: false,