-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Hardening “About Wire” window (WEBAPP-4478) #1101
Conversation
ghost
commented
Nov 10, 2017
- Now using Electron sandbox, preload script, ipc, nodeIntegration on false and javascript is also disabled on rendered page
- Prevent dropping links / following any kind of links but
- Only allow https:// links to be opened in the user browser (Chrome, Edge, FF…)
- Prevent the window from being minimized/maximized
- Always put the window on top of the other windows
- Typos
- Now using Electron sandbox, preload script, ipc, nodeIntegration on false and javascript is also disabled on rendered page - Prevent dropping links / following any kind of links but - Only allow https:// links to be opened in the user browser (Chrome, Edge, FF…) - Prevent the window from being minimized/maximized - Always put the window on top of the other windows - Typos
electron/main.js
Outdated
@@ -24,12 +24,17 @@ const fs = require('fs-extra'); | |||
const minimist = require('minimist'); | |||
const path = require('path'); | |||
const raygun = require('raygun'); | |||
const { app, BrowserWindow, ipcMain, Menu, shell } = require('electron'); | |||
const { session, app, BrowserWindow, ipcMain, Menu, shell } = require('electron'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no bracket spacing and put the contents in alphabetical order
electron/main.js
Outdated
title: config.NAME, | ||
width: config.WINDOW.ABOUT.WIDTH, | ||
backgroundColor: '#ececec', | ||
webPreferences: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort all properties in alphabetical order
electron/main.js
Outdated
javascript: false, | ||
nodeIntegration: false, | ||
nodeIntegrationInWorker: false, | ||
preload: path.join(APP_PATH, 'js', 'about.js'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is now a preload file, this needs to be reflected in the name.
yarn.lock
Outdated
@@ -0,0 +1,6619 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No yarn on wire-desktop
@@ -14,3 +14,4 @@ app.asar | |||
node_modules | |||
npm-debug.log | |||
Wire*.zip | |||
yarn.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alphabetical order if you really want to add it here.