1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-25174] Disable type 0 decryption based on feature flag (#16865)

* Disable type 0 decryption based on feature flag

* Add tests

* Move init to encrypt service
This commit is contained in:
Bernd Schoolmann
2025-10-20 13:15:11 +02:00
committed by GitHub
parent fa584f76b4
commit 433a2801f6
9 changed files with 125 additions and 0 deletions

View File

@@ -1483,6 +1483,7 @@ export default class MainBackground {
await this.sdkLoadService.loadAndInit();
// Only the "true" background should run migrations
await this.migrationRunner.run();
this.encryptService.init(this.configService);
// This is here instead of in the InitService b/c we don't plan for
// side effects to run in the Browser InitService.

View File

@@ -3,6 +3,8 @@ import { inject, Inject, Injectable } from "@angular/core";
import { AbstractThemingService } from "@bitwarden/angular/platform/services/theming/theming.service.abstraction";
import { TwoFactorService } from "@bitwarden/common/auth/abstractions/two-factor.service";
import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service";
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService as LogServiceAbstraction } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
@@ -29,6 +31,8 @@ export class InitService {
private sdkLoadService: SdkLoadService,
private viewCacheService: PopupViewCacheService,
private readonly migrationRunner: MigrationRunner,
private configService: ConfigService,
private encryptService: EncryptService,
@Inject(DOCUMENT) private document: Document,
) {}
@@ -40,6 +44,7 @@ export class InitService {
this.twoFactorService.init();
await this.viewCacheService.init();
await this.sizeService.init();
this.encryptService.init(this.configService);
const htmlEl = window.document.documentElement;
this.themingService.applyThemeChangesTo(this.document);