Fix buffer concatenation
TypedArray.prototype.set doesn't handle ArrayBuffers correctly (it writes all zeros). Instead, wrap each ArrayBuffer in a typed array for concatenation.
This commit is contained in:
parent
e07759a93c
commit
b69db59ad4
2 changed files with 5 additions and 5 deletions
|
@ -594,7 +594,7 @@ window.textsecure.subscribeToPush = function(message_callback) {
|
|||
|
||||
var handleAttachment = function(attachment) {
|
||||
return textsecure.api.getAttachment(attachment.id.toString()).then(function(encryptedBin) {
|
||||
return textsecure.crypto.decryptAttachment(encryptedBin, toArrayBuffer(attachment.key)).then(function(decryptedBin) {
|
||||
return textsecure.crypto.decryptAttachment(encryptedBin, attachment.key.toArrayBuffer()).then(function(decryptedBin) {
|
||||
attachment.decrypted = decryptedBin;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue