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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user