Don't allow webPreferences to be overrideden in features string

This commit is contained in:
Kevin Sawicki 2017-04-25 14:20:39 -07:00
parent 7726c7c6c4
commit 507f60e33e

View file

@ -202,6 +202,10 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, url, frameName,
if (value === undefined) {
additionalFeatures.push(key)
} else {
// Don't allow webPreferences to be set since it must be an object
// that cannot be directly overridden
if (key === 'webPreferences') return
if (webPreferences.includes(key)) {
if (options.webPreferences == null) {
options.webPreferences = {}