diff --git a/package-lock.json b/package-lock.json index ddf7f538..02517050 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2915,9 +2915,9 @@ "integrity": "sha512-9UjMCHK5GPgQRoNbqdLIAvAy0EInuiqbW0PBMtVP6B5B2HQJlvoJHM+KodPZMEjOa5VkSc+5LH7xy+cUzQdmHw==" }, "@types/ws": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.1.tgz", - "integrity": "sha512-ISCK1iFnR+jYv7+jLNX0wDqesZ/5RAeY3wUx6QaphmocphU61h+b+PHjS18TF4WIPTu/MMzxIq2PHr32o2TS5Q==", + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", "dev": true, "requires": { "@types/node": "*" diff --git a/package.json b/package.json index cb7a7a94..16679928 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@relaycorp/ws-mock": "^2.4.1", "@types/jest": "^26.0.24", "@types/verror": "^1.10.5", - "@types/ws": "^7.4.1", + "@types/ws": "^7.4.7", "axios-mock-adapter": "^1.19.0", "del-cli": "^4.0.1", "jest": "^27.0.6", diff --git a/src/lib/PoWebClient.ts b/src/lib/PoWebClient.ts index e06424fe..ec528b42 100644 --- a/src/lib/PoWebClient.ts +++ b/src/lib/PoWebClient.ts @@ -296,7 +296,7 @@ export class PoWebClient implements GSCClient { ws.once('message', async (message) => { let challenge: HandshakeChallenge; try { - challenge = HandshakeChallenge.deserialize(bufferToArray(message)); + challenge = HandshakeChallenge.deserialize(bufferToArray(message as Buffer)); } catch (error) { ws.close(WebSocketCode.CANNOT_ACCEPT, 'Malformed handshake challenge'); reject(