diff --git a/jslib b/jslib index 2d62e10d98..2c414ce27a 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 2d62e10d988633b7cd1c58af7e450cfa2150070b +Subproject commit 2c414ce27a5c14f6cd7f86cfd07096a192d058ca diff --git a/package.json b/package.json index fd13a83245..764872ce13 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "big-integer": "1.6.36", "bootstrap": "4.3.1", "braintree-web-drop-in": "1.13.0", + "browser-process-hrtime": "1.0.0", "core-js": "2.6.2", "duo_web_sdk": "git+https://github.com/duosecurity/duo_web_sdk.git#410a9186cc34663c4913b17d6528067cd3331f1d", "font-awesome": "4.7.0", diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 092af73aad..3e4d8dfa2f 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -30,6 +30,7 @@ import { AuditService } from 'jslib/services/audit.service'; import { AuthService } from 'jslib/services/auth.service'; import { CipherService } from 'jslib/services/cipher.service'; import { CollectionService } from 'jslib/services/collection.service'; +import { ConsoleLogService } from 'jslib/services/consoleLog.service'; import { ConstantsService } from 'jslib/services/constants.service'; import { ContainerService } from 'jslib/services/container.service'; import { CryptoService } from 'jslib/services/crypto.service'; @@ -94,8 +95,10 @@ const storageService: StorageServiceAbstraction = new HtmlStorageService(platfor const secureStorageService: StorageServiceAbstraction = new MemoryStorageService(); const cryptoFunctionService: CryptoFunctionServiceAbstraction = new WebCryptoFunctionService(window, platformUtilsService); +const consoleLogService = new ConsoleLogService(false); const cryptoService = new CryptoService(storageService, - platformUtilsService.isDev() ? storageService : secureStorageService, cryptoFunctionService, platformUtilsService); + platformUtilsService.isDev() ? storageService : secureStorageService, cryptoFunctionService, platformUtilsService, + consoleLogService); const tokenService = new TokenService(storageService); const appIdService = new AppIdService(storageService); const apiService = new ApiService(tokenService, platformUtilsService, @@ -108,7 +111,7 @@ const cipherService = new CipherService(cryptoService, userService, settingsServ const folderService = new FolderService(cryptoService, userService, apiService, storageService, i18nService, cipherService); const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService); -searchService = new SearchService(cipherService); +searchService = new SearchService(cipherService, consoleLogService); const policyService = new PolicyService(userService, storageService); const sendService = new SendService(cryptoService, userService, apiService, storageService, i18nService, cryptoFunctionService); @@ -122,11 +125,12 @@ const passwordGenerationService = new PasswordGenerationService(cryptoService, s const totpService = new TotpService(storageService, cryptoFunctionService); const containerService = new ContainerService(cryptoService); const authService = new AuthService(cryptoService, apiService, - userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService); + userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService, + consoleLogService); const exportService = new ExportService(folderService, cipherService, apiService); const importService = new ImportService(cipherService, folderService, apiService, i18nService, collectionService); const notificationsService = new NotificationsService(userService, syncService, appIdService, - apiService, vaultTimeoutService, async () => messagingService.send('logout', { expired: true })); + apiService, vaultTimeoutService, async () => messagingService.send('logout', { expired: true }), consoleLogService); const environmentService = new EnvironmentService(apiService, storageService, notificationsService); const auditService = new AuditService(cryptoFunctionService, apiService); const eventLoggingService = new EventLoggingService(storageService, apiService, userService, cipherService); diff --git a/src/connectors/sso.ts b/src/connectors/sso.ts index 46457b7bc4..6b93436108 100644 --- a/src/connectors/sso.ts +++ b/src/connectors/sso.ts @@ -37,8 +37,8 @@ function getQsParam(name: string) { function initiateBrowserSso(code: string, state: string) { window.postMessage({ command: 'authResult', code: code, state: state }, '*'); - let handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift(); - document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0' + const handOffMessage = ('; ' + document.cookie).split('; ssoHandOffMessage=').pop().split(';').shift(); + document.cookie = 'ssoHandOffMessage=;SameSite=strict;max-age=0'; document.getElementById('content').innerHTML = `
${handOffMessage}
`; } diff --git a/src/services/htmlStorage.service.ts b/src/services/htmlStorage.service.ts index b10d5ddd8f..2af52b9e2f 100644 --- a/src/services/htmlStorage.service.ts +++ b/src/services/htmlStorage.service.ts @@ -10,7 +10,7 @@ export class HtmlStorageService implements StorageService { ConstantsService.ssoStateKey, 'ssoOrgIdentifier']); private localStorageStartsWithKeys = ['twoFactorToken_', ConstantsService.collapsedGroupingsKey + '_']; private memoryStorageStartsWithKeys = ['ciphers_', 'folders_', 'collections_', 'settings_', 'lastSync_']; - private memoryStorage = new Map