feat: disable the remote module by default (#22091)

This commit is contained in:
Jeremy Apthorp 2020-02-10 10:49:09 -08:00 committed by GitHub
parent af631f8204
commit b77f701aeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 24 deletions

View file

@ -321,7 +321,7 @@ const unwrapArgs = function (sender: electron.WebContents, frameId: number, cont
const isRemoteModuleEnabledImpl = function (contents: electron.WebContents) {
const webPreferences = (contents as any).getLastWebPreferences() || {}
return webPreferences.enableRemoteModule != null ? !!webPreferences.enableRemoteModule : true
return webPreferences.enableRemoteModule != null ? !!webPreferences.enableRemoteModule : false
}
const isRemoteModuleEnabledCache = new WeakMap()