mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Update jslib (#942)
* Update jslib * stub out new platformUtilsService method * Throw not implemented * Update jslib * This interface method was reverted
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 66eec2b022...3c872e56f2
@@ -14,7 +14,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
|||||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
import { UserService } from 'jslib/abstractions/user.service';
|
import { UserService } from 'jslib/abstractions/user.service';
|
||||||
|
|
||||||
import { CipherString } from 'jslib/models/domain/cipherString';
|
import { EncString } from 'jslib/models/domain/encString';
|
||||||
import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey';
|
import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey';
|
||||||
import { CollectionRequest } from 'jslib/models/request/collectionRequest';
|
import { CollectionRequest } from 'jslib/models/request/collectionRequest';
|
||||||
import { SelectionReadOnlyRequest } from 'jslib/models/request/selectionReadOnlyRequest';
|
import { SelectionReadOnlyRequest } from 'jslib/models/request/selectionReadOnlyRequest';
|
||||||
@@ -63,7 +63,7 @@ export class CollectionAddEditComponent implements OnInit {
|
|||||||
this.title = this.i18nService.t('editCollection');
|
this.title = this.i18nService.t('editCollection');
|
||||||
try {
|
try {
|
||||||
const collection = await this.apiService.getCollectionDetails(this.organizationId, this.collectionId);
|
const collection = await this.apiService.getCollectionDetails(this.organizationId, this.collectionId);
|
||||||
this.name = await this.cryptoService.decryptToUtf8(new CipherString(collection.name), this.orgKey);
|
this.name = await this.cryptoService.decryptToUtf8(new EncString(collection.name), this.orgKey);
|
||||||
this.externalId = collection.externalId;
|
this.externalId = collection.externalId;
|
||||||
if (collection.groups != null && this.groups.length > 0) {
|
if (collection.groups != null && this.groups.length > 0) {
|
||||||
collection.groups.forEach(s => {
|
collection.groups.forEach(s => {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
import { EmergencyAccessStatusType } from 'jslib/enums/emergencyAccessStatusType';
|
import { EmergencyAccessStatusType } from 'jslib/enums/emergencyAccessStatusType';
|
||||||
import { Utils } from 'jslib/misc/utils';
|
import { Utils } from 'jslib/misc/utils';
|
||||||
|
|
||||||
import { CipherString } from 'jslib/models/domain/cipherString';
|
import { EncString } from 'jslib/models/domain/encString';
|
||||||
import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey';
|
import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey';
|
||||||
|
|
||||||
import { CipherWithIdRequest } from 'jslib/models/request/cipherWithIdRequest';
|
import { CipherWithIdRequest } from 'jslib/models/request/cipherWithIdRequest';
|
||||||
@@ -108,7 +108,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async performSubmitActions(newMasterPasswordHash: string, newKey: SymmetricCryptoKey,
|
async performSubmitActions(newMasterPasswordHash: string, newKey: SymmetricCryptoKey,
|
||||||
newEncKey: [SymmetricCryptoKey, CipherString]) {
|
newEncKey: [SymmetricCryptoKey, EncString]) {
|
||||||
const request = new PasswordRequest();
|
const request = new PasswordRequest();
|
||||||
request.masterPasswordHash = await this.cryptoService.hashPassword(this.currentMasterPassword, null);
|
request.masterPasswordHash = await this.cryptoService.hashPassword(this.currentMasterPassword, null);
|
||||||
request.newMasterPasswordHash = newMasterPasswordHash;
|
request.newMasterPasswordHash = newMasterPasswordHash;
|
||||||
@@ -136,7 +136,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
private async updateKey(key: SymmetricCryptoKey, masterPasswordHash: string) {
|
private async updateKey(key: SymmetricCryptoKey, masterPasswordHash: string) {
|
||||||
const encKey = await this.cryptoService.makeEncKey(key);
|
const encKey = await this.cryptoService.makeEncKey(key);
|
||||||
const privateKey = await this.cryptoService.getPrivateKey();
|
const privateKey = await this.cryptoService.getPrivateKey();
|
||||||
let encPrivateKey: CipherString = null;
|
let encPrivateKey: EncString = null;
|
||||||
if (privateKey != null) {
|
if (privateKey != null) {
|
||||||
encPrivateKey = await this.cryptoService.encrypt(privateKey, encKey[0]);
|
encPrivateKey = await this.cryptoService.encrypt(privateKey, encKey[0]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
|
|||||||
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||||
|
|
||||||
import { CipherString } from 'jslib/models/domain/cipherString';
|
import { EncString } from 'jslib/models/domain/encString';
|
||||||
|
|
||||||
import { CipherWithIdRequest } from 'jslib/models/request/cipherWithIdRequest';
|
import { CipherWithIdRequest } from 'jslib/models/request/cipherWithIdRequest';
|
||||||
import { FolderWithIdRequest } from 'jslib/models/request/folderWithIdRequest';
|
import { FolderWithIdRequest } from 'jslib/models/request/folderWithIdRequest';
|
||||||
@@ -64,7 +64,7 @@ export class UpdateKeyComponent {
|
|||||||
const key = await this.cryptoService.getKey();
|
const key = await this.cryptoService.getKey();
|
||||||
const encKey = await this.cryptoService.makeEncKey(key);
|
const encKey = await this.cryptoService.makeEncKey(key);
|
||||||
const privateKey = await this.cryptoService.getPrivateKey();
|
const privateKey = await this.cryptoService.getPrivateKey();
|
||||||
let encPrivateKey: CipherString = null;
|
let encPrivateKey: EncString = null;
|
||||||
if (privateKey != null) {
|
if (privateKey != null) {
|
||||||
encPrivateKey = await this.cryptoService.encrypt(privateKey, encKey[0]);
|
encPrivateKey = await this.cryptoService.encrypt(privateKey, encKey[0]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user