mirror of https://github.com/keeweb/keeweb
fixed data decryption error
parent
d3fcbcb6a5
commit
946a063993
|
@ -84,6 +84,9 @@ function decryptRequest(request) {
|
|||
const message = kdbxweb.ByteUtils.base64ToBytes(request.message);
|
||||
|
||||
const data = tweetnaclBox.open(message, nonce, client.publicKey, client.keys.secretKey);
|
||||
if (!data) {
|
||||
throw new Error('Failed to decrypt data');
|
||||
}
|
||||
|
||||
const json = new TextDecoder().decode(data);
|
||||
const payload = JSON.parse(json);
|
||||
|
|
Loading…
Reference in New Issue