Skip to content

Commit

Permalink
Fix security vulnerability and remove menu on customize page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerrod Lankford committed Sep 15, 2021
1 parent 719e0db commit 4d9fcf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.js
Expand Up @@ -6,6 +6,7 @@ const path = require('path');
const ThemeInjector = require('./utils/themeInjector');
const MenuInjector = require('./utils/menuInjector');
const Store = require('electron-store');
const Url = require('url');

// Constants
const store = new Store();
Expand Down Expand Up @@ -69,6 +70,7 @@ ipcMain.on('show-customize', () => {
}
});
win.setBrowserView(view);
win.removeMenu();
view.setBounds({ x: 0, y: 0, width: 800, height: 600 });
view.webContents.loadFile(path.join(appPath, 'src', 'pages', 'customize.html'));

Expand Down Expand Up @@ -160,7 +162,8 @@ function createWindow() {
// signed into services that need authentication (e.g. Spotify). Note that if the user ever gets
// stuck navigated somewhere that isn't the main Google Voice page, they can always use the "Reload"
// item in the notification area icon context menu to get back to the Google Voice home page.
if ((url.startsWith('https://voice.google.com') || url.startsWith('https://accounts.google.com'))) {
const hostName = Url.parse(url).hostname;
if ( hostName === 'voice.google.com' || hostName === 'accounts.google.com') {
win && win.loadURL(url);
}
else {
Expand Down

0 comments on commit 4d9fcf9

Please sign in to comment.