rename blinkFeatures to enableBlinkFeatures
This commit is contained in:
parent
bc10be3de6
commit
5f5322c64e
9 changed files with 19 additions and 47 deletions
|
@ -229,23 +229,23 @@ module.exports = {
|
|||
},
|
||||
|
||||
/**
|
||||
* #10 on the checklist: Do not use blinkFeatures
|
||||
* #10 on the checklist: Do not use enableBlinkFeatures
|
||||
*
|
||||
* Logs a warning message about blinkFeatures
|
||||
* Logs a warning message about enableBlinkFeatures
|
||||
*/
|
||||
warnAboutBlinkFeatures: () => {
|
||||
warnAboutEnableBlinkFeatures: () => {
|
||||
const webPreferences = getWebPreferences()
|
||||
if (!webPreferences || !webPreferences.blinkFeatures ||
|
||||
(webPreferences.blinkFeatures.length && webPreferences.blinkFeatures.length === 0)) {
|
||||
if (!webPreferences || !webPreferences.enableBlinkFeatures ||
|
||||
(webPreferences.enableBlinkFeatures.length && webPreferences.enableBlinkFeatures.length === 0)) {
|
||||
return
|
||||
}
|
||||
|
||||
let warning = 'This renderer process has additional "blinkFeatures" ' +
|
||||
let warning = 'This renderer process has additional "enableBlinkFeatures" ' +
|
||||
'enabled. This exposes users of this app to some security risk. ' +
|
||||
'If you do not need this feature, you should disable it.\n' +
|
||||
moreInformation
|
||||
|
||||
console.warn('%cElectron Security Warning (blinkFeatures)',
|
||||
console.warn('%cElectron Security Warning (enableBlinkFeatures)',
|
||||
'font-weight: bold;', warning)
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue