mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
macBytes must exist if key has macKey
This commit is contained in:
@@ -482,6 +482,11 @@ export class CryptoService implements CryptoServiceInterface {
|
|||||||
const keyForEnc = await this.getKeyForEncryption(key);
|
const keyForEnc = await this.getKeyForEncryption(key);
|
||||||
const theKey = this.resolveLegacyKey(encType, keyForEnc);
|
const theKey = this.resolveLegacyKey(encType, keyForEnc);
|
||||||
|
|
||||||
|
if (theKey.macKey != null && macBytes == null) {
|
||||||
|
console.error('macBytes required.');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (encType !== theKey.encType) {
|
if (encType !== theKey.encType) {
|
||||||
// tslint:disable-next-line
|
// tslint:disable-next-line
|
||||||
console.error('encType unavailable.');
|
console.error('encType unavailable.');
|
||||||
|
|||||||
Reference in New Issue
Block a user