mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
Feature/use hcaptcha if bot (#1968)
* Add captcha to login page * Include log service in DI providers for api-action directive * Add captcha to register page * update jslib
This commit is contained in:
@@ -42,6 +42,7 @@ import {
|
||||
EnvironmentService as EnvironmentServiceAbstraction,
|
||||
FolderService as FolderServiceAbstraction,
|
||||
I18nService as I18nServiceAbstraction,
|
||||
LogService as LogServiceAbstraction,
|
||||
MessagingService as MessagingServiceAbstraction,
|
||||
PasswordGenerationService as PasswordGenerationServiceAbstraction,
|
||||
PlatformUtilsService as PlatformUtilsServiceAbstraction,
|
||||
@@ -95,7 +96,7 @@ export default class MainBackground {
|
||||
i18nService: I18nServiceAbstraction;
|
||||
platformUtilsService: PlatformUtilsServiceAbstraction;
|
||||
constantsService: ConstantsService;
|
||||
consoleLogService: ConsoleLogService;
|
||||
logService: LogServiceAbstraction;
|
||||
cryptoService: CryptoServiceAbstraction;
|
||||
cryptoFunctionService: CryptoFunctionServiceAbstraction;
|
||||
tokenService: TokenServiceAbstraction;
|
||||
@@ -172,23 +173,23 @@ export default class MainBackground {
|
||||
this.secureStorageService = new BrowserStorageService();
|
||||
this.i18nService = new I18nService(BrowserApi.getUILanguage(window));
|
||||
this.cryptoFunctionService = new WebCryptoFunctionService(window, this.platformUtilsService);
|
||||
this.consoleLogService = new ConsoleLogService(false);
|
||||
this.logService = new ConsoleLogService(false);
|
||||
this.cryptoService = new BrowserCryptoService(this.storageService, this.secureStorageService,
|
||||
this.cryptoFunctionService, this.platformUtilsService, this.consoleLogService);
|
||||
this.cryptoFunctionService, this.platformUtilsService, this.logService);
|
||||
this.tokenService = new TokenService(this.storageService);
|
||||
this.appIdService = new AppIdService(this.storageService);
|
||||
this.apiService = new ApiService(this.tokenService, this.platformUtilsService,
|
||||
(expired: boolean) => this.logout(expired));
|
||||
this.userService = new UserService(this.tokenService, this.storageService);
|
||||
this.settingsService = new SettingsService(this.userService, this.storageService);
|
||||
this.fileUploadService = new FileUploadService(this.consoleLogService, this.apiService);
|
||||
this.fileUploadService = new FileUploadService(this.logService, this.apiService);
|
||||
this.cipherService = new CipherService(this.cryptoService, this.userService, this.settingsService,
|
||||
this.apiService, this.fileUploadService, this.storageService, this.i18nService, () => this.searchService);
|
||||
this.folderService = new FolderService(this.cryptoService, this.userService, this.apiService,
|
||||
this.storageService, this.i18nService, this.cipherService);
|
||||
this.collectionService = new CollectionService(this.cryptoService, this.userService, this.storageService,
|
||||
this.i18nService);
|
||||
this.searchService = new SearchService(this.cipherService, this.consoleLogService, this.i18nService);
|
||||
this.searchService = new SearchService(this.cipherService, this.logService, this.i18nService);
|
||||
this.sendService = new SendService(this.cryptoService, this.userService, this.apiService, this.fileUploadService,
|
||||
this.storageService, this.i18nService, this.cryptoFunctionService);
|
||||
this.stateService = new StateService();
|
||||
@@ -223,7 +224,7 @@ export default class MainBackground {
|
||||
this.exportService = new ExportService(this.folderService, this.cipherService, this.apiService,
|
||||
this.cryptoService);
|
||||
this.notificationsService = new NotificationsService(this.userService, this.syncService, this.appIdService,
|
||||
this.apiService, this.vaultTimeoutService, () => this.logout(true), this.consoleLogService);
|
||||
this.apiService, this.vaultTimeoutService, () => this.logout(true), this.logService);
|
||||
this.environmentService = new EnvironmentService(this.apiService, this.storageService,
|
||||
this.notificationsService);
|
||||
this.popupUtilsService = new PopupUtilsService(this.platformUtilsService);
|
||||
@@ -269,7 +270,7 @@ export default class MainBackground {
|
||||
const message = Object.assign({}, { command: subscriber }, arg);
|
||||
that.runtimeBackground.processMessage(message, that, null);
|
||||
}
|
||||
}(), this.vaultTimeoutService, this.consoleLogService);
|
||||
}(), this.vaultTimeoutService, this.logService);
|
||||
}
|
||||
|
||||
async bootstrap() {
|
||||
|
||||
Reference in New Issue
Block a user