fixing regression handling v1 key format (un-decoded base64)

This commit is contained in:
El RIDO 2019-05-19 08:36:18 +02:00
parent 0e71211fad
commit 3b0ab7e99f
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
4 changed files with 10 additions and 12 deletions

View file

@ -1138,11 +1138,11 @@ jQuery.PrivateBin = (function($, RawDeflate) {
newKey = newKey.substring(0, ampersandPos);
}
// version 2 uses base58, version 1 uses base64
// version 2 uses base58, version 1 uses base64 without decoding
try {
symmetricKey = CryptTool.base58decode(newKey);
} catch(e) {
symmetricKey = atob(newKey);
symmetricKey = newKey;
}
}