Don't pass preloadPath via ELECTRON_BROWSER_SANDBOX_LOAD for security reasons (#13031)
This commit is contained in:
parent
e08ce7127a
commit
702cc84bd3
8 changed files with 57 additions and 26 deletions
|
@ -440,7 +440,8 @@ ipcMain.on('ELECTRON_BROWSER_WINDOW_CLOSE', function (event) {
|
|||
event.returnValue = null
|
||||
})
|
||||
|
||||
ipcMain.on('ELECTRON_BROWSER_SANDBOX_LOAD', function (event, preloadPath) {
|
||||
ipcMain.on('ELECTRON_BROWSER_SANDBOX_LOAD', function (event) {
|
||||
const preloadPath = event.sender._getPreloadPath()
|
||||
let preloadSrc = null
|
||||
let preloadError = null
|
||||
if (preloadPath) {
|
||||
|
@ -451,8 +452,8 @@ ipcMain.on('ELECTRON_BROWSER_SANDBOX_LOAD', function (event, preloadPath) {
|
|||
}
|
||||
}
|
||||
event.returnValue = {
|
||||
preloadSrc: preloadSrc,
|
||||
preloadError: preloadError,
|
||||
preloadSrc,
|
||||
preloadError,
|
||||
platform: process.platform,
|
||||
env: process.env
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue