mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Split native messaging into renderer and background service. Encrypt messages and verify timestamp
This commit is contained in:
@@ -18,7 +18,7 @@ import { ElectronStorageService } from 'jslib/electron/services/electronStorage.
|
||||
import { TrayMain } from 'jslib/electron/tray.main';
|
||||
import { UpdaterMain } from 'jslib/electron/updater.main';
|
||||
import { WindowMain } from 'jslib/electron/window.main';
|
||||
import { NativeMessagingService } from './services/nativeMessaging.service';
|
||||
import { NativeMessagingMain } from './main/nativeMessaging.main';
|
||||
|
||||
export class Main {
|
||||
logService: ElectronLogService;
|
||||
@@ -34,7 +34,7 @@ export class Main {
|
||||
powerMonitorMain: PowerMonitorMain;
|
||||
trayMain: TrayMain;
|
||||
biometricMain: BiometricMain;
|
||||
nativeMessagingService: NativeMessagingService;
|
||||
nativeMessagingMain: NativeMessagingMain;
|
||||
|
||||
constructor() {
|
||||
// Set paths for portable builds
|
||||
@@ -119,7 +119,7 @@ export class Main {
|
||||
this.biometricMain = new BiometricDarwinMain(this.storageService, this.i18nService);
|
||||
}
|
||||
|
||||
this.nativeMessagingService = new NativeMessagingService(this.logService, this.biometricMain, app.getPath('userData'), app.getAppPath());
|
||||
this.nativeMessagingMain = new NativeMessagingMain(this.logService, this.windowMain, app.getPath('userData'), app.getAppPath());
|
||||
}
|
||||
|
||||
bootstrap() {
|
||||
@@ -145,7 +145,7 @@ export class Main {
|
||||
}
|
||||
|
||||
if (await this.storageService.get<boolean>(ElectronConstants.enableBrowserIntegration)) {
|
||||
this.nativeMessagingService.listen();
|
||||
this.nativeMessagingMain.listen();
|
||||
}
|
||||
|
||||
if (!app.isDefaultProtocolClient('bitwarden')) {
|
||||
|
||||
Reference in New Issue
Block a user