Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit c16c769

Browse files
committed
Upgrade Electron to address CVEs. Bump version to 0.5.0
1 parent 44cdcae commit c16c769

File tree

5 files changed

+77
-22
lines changed

5 files changed

+77
-22
lines changed

app/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function createWindow() {
7474
'nodeIntegration': false,
7575
'sandbox': true,
7676
'disableBlinkFeatures': 'Auxclick',
77-
'contextIsolation': false,
77+
'contextIsolation': true,
7878
'preload': path.join(__dirname, 'preload.js')
7979
}
8080
});
@@ -144,7 +144,6 @@ function createWindow() {
144144
}
145145

146146
function startServer() {
147-
console.log(server.listening)
148147
if (server.listening != true) {
149148
server.listen({
150149
host: '127.0.0.1',

app/package-lock.json

Lines changed: 57 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cryptr",
33
"author": "Jacob Crowther <crowther@adobe.com>",
4-
"version": "0.4.0",
4+
"version": "0.5.0",
55
"description": "A GUI for Vault",
66
"repository": {
77
"url": "https://github.com/jcrowthe/cryptr.git"

app/preload.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
const { ipcRenderer } = require('electron')
2+
const { contextBridge } = require('electron')
23

3-
window.startOIDCServer = function() {
4+
contextBridge.exposeInMainWorld('startOIDCServer', function() {
45
ipcRenderer.send("start-oidc", "start");
5-
}
6+
});
67

7-
window.stopOIDCServer = function() {
8+
contextBridge.exposeInMainWorld('stopOIDCServer', function() {
89
ipcRenderer.send("stop-oidc", "stop");
9-
}
10+
});
1011

11-
window.openOIDCURL = function(url) {
12+
contextBridge.exposeInMainWorld('openOIDCURL', function(url) {
1213
ipcRenderer.send("open-oidc-url", url);
13-
}
14+
});
1415

1516

16-
window.onOIDCAuthData = function(callback) {
17+
contextBridge.exposeInMainWorld('onOIDCAuthData', function(callback) {
1718
authData = callback
18-
}
19+
});
1920

20-
window.onOIDCAuthError = function(callback) {
21+
contextBridge.exposeInMainWorld('onOIDCAuthError', function(callback) {
2122
authError = callback
22-
}
23+
});
2324

24-
window.onOIDCAuthStartError = function(callback) {
25+
contextBridge.exposeInMainWorld('onOIDCAuthStartError', function(callback) {
2526
authStartError = callback
26-
}
27+
});
2728

28-
window.onOIDCAuthStartSuccess = function(callback) {
29+
contextBridge.exposeInMainWorld('onOIDCAuthStartSuccess', function(callback) {
2930
authStartSuccess = callback
30-
}
31+
});
3132

3233
ipcRenderer.on('oidc-auth-data', (event, arg) => {
3334
if (authData) authData(arg);

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cryptr",
33
"author": "Jacob Crowther <crowther@adobe.com>",
4-
"version": "0.4.0",
4+
"version": "0.5.0",
55
"description": "A GUI for Vault",
66
"main": "app/index.js",
77
"repository": {
@@ -19,8 +19,8 @@
1919
"chai": "^3.5.0",
2020
"chai-as-promised": "^5.3.0",
2121
"cross-env": "^5.2.1",
22-
"electron": "^4.2.12",
23-
"electron-builder": "^22.3.2",
22+
"electron": "^15.1.2",
23+
"electron-builder": "^22.13.1",
2424
"electron-prebuilt": "^1.4.13",
2525
"mocha": "^5.2.0"
2626
},

0 commit comments

Comments
 (0)