diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-06-28 16:26:57 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-06-28 16:26:57 +0200 |
| commit | f1c65c22d977aa7a1f5259a70232b306c47f3f7f (patch) | |
| tree | d6041e7d057ed3a4bab289b2f4c9dc74b5cb614f | |
| parent | bac60998f00ac845b5e0f1fbab9980f4ee3de080 (diff) | |
| parent | b20f3080b8d815599726dbabe02b350cbcf2fd82 (diff) | |
| download | mullvadvpn-f1c65c22d977aa7a1f5259a70232b306c47f3f7f.tar.xz mullvadvpn-f1c65c22d977aa7a1f5259a70232b306c47f3f7f.zip | |
Merge branch 'hotfix-master'
| -rw-r--r-- | app/main.js | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/app/main.js b/app/main.js index 548605e6a1..c6bade7719 100644 --- a/app/main.js +++ b/app/main.js @@ -7,7 +7,6 @@ import { app, BrowserWindow, ipcMain, Tray, Menu, nativeImage } from 'electron'; import TrayIconController from './tray-icon-controller'; import WindowController from './window-controller'; import { version } from '../package.json'; -import { parseIpcCredentials } from './lib/backend'; import { resolveBin } from './lib/proc'; import { getSystemTemporaryDirectory } from './lib/tempdir'; import { canTrustRpcAddressFile } from './lib/rpc-file-security'; @@ -17,6 +16,33 @@ import uuid from 'uuid'; import { ShutdownCoordinator } from './shutdown-handler'; import type { TrayIconType } from './tray-icon-controller'; +/* +HOTFIX +We had an issue importing this stuff from backend.js but +since it's going away in one of already open PRs, +there is no point in trying to make it any nicer, + +Hence duplicating this piece in here +TODO: Remove during merge + */ +export type IpcCredentials = { + connectionString: string, + sharedSecret: string, +}; +export function parseIpcCredentials(data: string): ?IpcCredentials { + const [connectionString, sharedSecret] = data.split('\n', 2); + if (connectionString && sharedSecret !== undefined) { + return { + connectionString, + sharedSecret, + }; + } else { + return null; + } +} + +/** / HOTFIX */ + // The name for application directory used for // scoping logs and user data in platform special folders const appDirectoryName = 'Mullvad VPN'; |
