From cfe046dcb39967ca90db0cd84505cc0f00e97e80 Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Tue, 2 May 2017 13:18:16 -0400 Subject: [PATCH] Increase WebSocket sec key length to 24 characters --- src/WebSocketClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WebSocketClient.cpp b/src/WebSocketClient.cpp index f78d946..ab41b0a 100644 --- a/src/WebSocketClient.cpp +++ b/src/WebSocketClient.cpp @@ -35,8 +35,8 @@ int WebSocketClient::begin(const char* aPath) if (status == 0) { - uint8_t randomKey[13]; - char base64RandomKey[21]; + uint8_t randomKey[16]; + char base64RandomKey[25]; // create a random key for the connection upgrade for (int i = 0; i < (int)sizeof(randomKey); i++)