|
@@ -249,6 +249,16 @@ const warnAboutAllowedPopups = function () {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const warnAboutNodeIntegrationDefault = function (webPreferences) {
|
|
|
+ if (webPreferences.nodeIntegration && !webPreferences.nodeIntegrationWasExplicitlyEnabled) {
|
|
|
+ const warning = `This window has node integration enabled by default. In ` +
|
|
|
+ `Electron 5.0.0, node integration will be disabled by default. To prepare ` +
|
|
|
+ `for this change, set {nodeIntegration: true} in the webPreferences for ` +
|
|
|
+ `this window.`
|
|
|
+ console.warn('%cElectron Deprecation Warning (nodeIntegration default change)', 'font-weight: bold;', warning)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// Currently missing since we can't easily programmatically check for it:
|
|
|
// #12WebViews: Verify the options and params of all `<webview>` tags
|
|
|
|
|
@@ -261,6 +271,7 @@ const logSecurityWarnings = function (webPreferences, nodeIntegration) {
|
|
|
warnAboutEnableBlinkFeatures(webPreferences)
|
|
|
warnAboutInsecureCSP()
|
|
|
warnAboutAllowedPopups()
|
|
|
+ warnAboutNodeIntegrationDefault(webPreferences)
|
|
|
}
|
|
|
|
|
|
const getWebPreferences = function () {
|