Enforce stronger types for ArrayBuffers and storage

This commit is contained in:
Fedor Indutny
2021-06-14 17:09:37 -07:00
committed by GitHub
parent 61ac79e9ae
commit 8f5086227a
56 changed files with 748 additions and 675 deletions

View File

@@ -30,6 +30,7 @@
import { connection as WebSocket, IMessage } from 'websocket';
import { ByteBufferClass } from '../window.d';
import { typedArrayToArrayBuffer as toArrayBuffer } from '../Crypto';
import EventTarget from './EventTarget';
@@ -153,7 +154,7 @@ export default class WebSocketResource extends EventTarget {
}
const message = window.textsecure.protobuf.WebSocketMessage.decode(
binaryData
toArrayBuffer(binaryData)
);
if (
message.type ===