1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

remove old Edge browser hacks (#168)

* remove old Edge browser hacks

* Remove final edge hacks

* Update constructor parameters

* Update search-ciphers.pipe.ts

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
This commit is contained in:
Chad Scharf
2020-09-15 10:23:21 -04:00
committed by GitHub
parent fa2b8e834b
commit 5e0a2d1d99
7 changed files with 7 additions and 37 deletions

View File

@@ -105,7 +105,7 @@ export class RegisterComponent {
this.name = this.name === '' ? null : this.name;
this.email = this.email.trim().toLowerCase();
const kdf = KdfType.PBKDF2_SHA256;
const useLowerKdf = this.platformUtilsService.isEdge() || this.platformUtilsService.isIE();
const useLowerKdf = this.platformUtilsService.isIE();
const kdfIterations = useLowerKdf ? 10000 : 100000;
const key = await this.cryptoService.makeKey(this.masterPassword, this.email, kdf, kdfIterations);
const encKey = await this.cryptoService.makeEncKey(key);

View File

@@ -44,7 +44,7 @@ export class SetPasswordComponent extends BaseChangePasswordComponent {
async setupSubmitActions() {
this.kdf = KdfType.PBKDF2_SHA256;
const useLowerKdf = this.platformUtilsService.isEdge() || this.platformUtilsService.isIE();
const useLowerKdf = this.platformUtilsService.isIE();
this.kdfIterations = useLowerKdf ? 10000 : 100000;
return true;
}

View File

@@ -5,20 +5,10 @@ import {
import { CipherView } from '../../models/view/cipherView';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
import { DeviceType } from '../../enums';
@Pipe({
name: 'searchCiphers',
})
export class SearchCiphersPipe implements PipeTransform {
private onlySearchName = false;
constructor(platformUtilsService: PlatformUtilsService) {
this.onlySearchName = platformUtilsService.getDevice() === DeviceType.EdgeExtension;
}
transform(ciphers: CipherView[], searchText: string, deleted: boolean = false): CipherView[] {
if (ciphers == null || ciphers.length === 0) {
return [];
@@ -38,9 +28,6 @@ export class SearchCiphersPipe implements PipeTransform {
if (c.name != null && c.name.toLowerCase().indexOf(searchText) > -1) {
return true;
}
if (this.onlySearchName) {
return false;
}
if (searchText.length >= 8 && c.id.startsWith(searchText)) {
return true;
}