From 43959714937d2e17a84aa7947389ae0365f5adff Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 3 Oct 2024 18:37:53 +0700 Subject: [PATCH] #314 subtle.encrypt returns an ArrayBuffer, we want a Uint8Array.. --- html5/js/Protocol.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html5/js/Protocol.js b/html5/js/Protocol.js index 842f5870..7f25bf19 100644 --- a/html5/js/Protocol.js +++ b/html5/js/Protocol.js @@ -462,7 +462,7 @@ class XpraProtocol { if (this.cipher_out_key) { //console("encrypting", packet[0], "packet using", JSON.stringify(this.cipher_out_params), ":", bdata); crypto.subtle.encrypt(this.cipher_out_params, this.cipher_out_key, bdata) - .then(encrypted => this.send_packet(encrypted, payload_size, true)) + .then(encrypted => this.send_packet(new Uint8Array(encrypted), payload_size, true)) .catch(err => this.protocol_error("failed to encrypt packet: "+err)); return; }