1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-25 16:59:17 +01:00

crypto fix for mac

This commit is contained in:
Kyle Spearrin 2017-04-20 16:32:03 -04:00
parent 180101400f
commit f92c5a214f

View File

@ -354,7 +354,7 @@ angular
var ivBytes = forge.util.decode64(encPieces[0]);
var ctBytes = forge.util.decode64(encPieces[1]);
if (key.macKey) {
if (key.macKey && encPieces.length > 2) {
var computedMac = computeMac(ctBytes, ivBytes, key.macKey);
if (computedMac !== encPieces[2]) {
console.error('MAC failed.');