Skip to content
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

Merged
8 commits merged into from
Nov 15, 2017
Merged

Conversation

ghost
Copy link

@ghost 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
@ghost ghost requested review from lipis and gregor November 10, 2017 17:11
@ghost ghost changed the title Hardening “About Wire” window WEBAPP-4478: Hardening “About Wire” window Nov 10, 2017
@ghost ghost requested a review from bennycode November 13, 2017 10:47
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');
Copy link
Contributor

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: {
Copy link
Contributor

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'),
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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.

@gregor gregor changed the title WEBAPP-4478: Hardening “About Wire” window Hardening “About Wire” window (WEBAPP-4478) Nov 14, 2017
@gregor gregor changed the title Hardening “About Wire” window (WEBAPP-4478) fix: Hardening “About Wire” window (WEBAPP-4478) Nov 14, 2017
@ghost ghost merged commit 947a2f8 into master Nov 15, 2017
@ghost ghost deleted the fix/WEBAPP-4478 branch November 15, 2017 18:27
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants