Incoming request bodies are no longer base64

Since the socket is not a text-based transport, there's no need to
base64-encode the IncomingPushMessageSignal.
This commit is contained in:
lilia 2014-12-05 18:02:17 -08:00
parent 2ba88bd13a
commit 4f97f8c1e4

View file

@ -545,7 +545,7 @@ window.textsecure.protocol = function() {
var aes_key = toArrayBuffer(signaling_key.substring(0, 32));
var mac_key = toArrayBuffer(signaling_key.substring(32, 32 + 20));
var decodedMessage = StringView.base64ToBytes(getString(message));
var decodedMessage = message.toArrayBuffer();
if (new Uint8Array(decodedMessage)[0] != 1)
throw new Error("Got bad version number: " + decodedMessage[0]);