diff --git a/package-lock.json b/package-lock.json index fc28cfa..f4d3f25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7934,9 +7934,9 @@ } }, "electron": { - "version": "8.5.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-8.5.2.tgz", - "integrity": "sha512-VU+zZnmCzxoZ5UfBg2UGVm+nyxlNlQOQkotMLfk7FCtnkIOhX+sosl618OCxUWjOvPc+Mpg5MEkEmxPU5ziW4Q==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/electron/-/electron-10.1.3.tgz", + "integrity": "sha512-CR8LrlG47MdAp317SQ3vGYa2o2cIMdMSMPYH46OVitFLk35dwE9fn3VqvhUIXhCHYcNWIAPzMhkVHpkoFdKWuw==", "dev": true, "requires": { "@electron/get": "^1.0.1", diff --git a/package.json b/package.json index c3efeaa..d9a058b 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "cpy-cli": "^3.1.0", "cross-env": "^7.0.2", "del-cli": "^3.0.0", - "electron": "^8.2.3", + "electron": "^10.1.3", "electron-builder": "^22.5.1", "electron-webpack": "^2.8.2", "fs-extra": "^9.0.0", diff --git a/src/electron/components/window.ts b/src/electron/components/window.ts index 3fdccde..7d30d21 100644 --- a/src/electron/components/window.ts +++ b/src/electron/components/window.ts @@ -31,6 +31,9 @@ export class Window { // Isolate window context to protect against prototype pollution // except in e2e test when that access is required by Spectron contextIsolation: global.gConfig.isContextIsolation, + // Ensure that JS values can't unsafely cross between worlds + // when using contextIsolation + worldSafeExecuteJavaScript: global.gConfig.isContextIsolation, // Disable the remote module to enhance security // except in e2e test when that access is required by Spectron enableRemoteModule: global.gConfig.isEnableRemoteModule,