From 08e9dca7e48e8e32d8ee644f0a45090a80c2c1b0 Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Tue, 8 Jun 2021 15:31:54 +1000 Subject: [PATCH 1/2] Don't start popup services if in private mode --- src/popup/services/services.module.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/popup/services/services.module.ts b/src/popup/services/services.module.ts index 89df33a18a..4ef57fa482 100644 --- a/src/popup/services/services.module.ts +++ b/src/popup/services/services.module.ts @@ -65,12 +65,14 @@ function getBgService(service: string) { }; } +const isPrivateMode = BrowserApi.getBackgroundPage() == null; + const stateService = new StateService(); const messagingService = new BrowserMessagingService(); -const searchService = new PopupSearchService(getBgService('searchService')(), +const searchService = isPrivateMode ? null : new PopupSearchService(getBgService('searchService')(), getBgService('cipherService')(), getBgService('consoleLogService')(), getBgService('i18nService')()); -const passwordRepromptService = new PasswordRepromptService(getBgService('i18nService')(), +const passwordRepromptService = isPrivateMode ? null : new PasswordRepromptService(getBgService('i18nService')(), getBgService('cryptoService')(), getBgService('platformUtilsService')()); export function initFactory(platformUtilsService: PlatformUtilsService, i18nService: I18nService, storageService: StorageService, @@ -84,7 +86,7 @@ export function initFactory(platformUtilsService: PlatformUtilsService, i18nServ window.document.body.classList.add('body-sm'); } - if (BrowserApi.getBackgroundPage() != null) { + if (!isPrivateMode) { await stateService.save(ConstantsService.disableFaviconKey, await storageService.get(ConstantsService.disableFaviconKey)); From 786dd28a842b7330812625c2f10887bbbc5d2e94 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 8 Jun 2021 09:29:11 +0200 Subject: [PATCH 2/2] Add a button to prompt WebAuthn on FF and Safari (#1879) --- jslib | 2 +- src/_locales/en/messages.json | 5 ++++- src/popup/accounts/two-factor.component.html | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 1016bbfb9e..ff387622e0 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 1016bbfb9eb28c220de8d2ab86d1f2757328f254 +Subproject commit ff387622e0e8bbfb45a6a06da5eb86c8da9d763d diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 2e22eaacd2..8309ae412f 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -803,7 +803,10 @@ "message": "Insert your security key into your computer's USB port. If it has a button, touch it." }, "webAuthnNewTab": { - "message": "Continue the WebAuthn 2FA verification in the new tab." + "message": "To start the WebAuthn 2FA verification. Click the button below to open a new tab and follow the instructions provided in the new tab." + }, + "webAuthnNewTabOpen": { + "message": "Open new tab" }, "webAuthnAuthenticate": { "message": "Authenticate WebAuthn" diff --git a/src/popup/accounts/two-factor.component.html b/src/popup/accounts/two-factor.component.html index db6518b817..2e8cd97b06 100644 --- a/src/popup/accounts/two-factor.component.html +++ b/src/popup/accounts/two-factor.component.html @@ -73,6 +73,7 @@

{{'webAuthnNewTab' | i18n}}

+