From fd4177157e865fe025ebbbe63a6a3d179f348cd4 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Wed, 8 Apr 2015 19:49:45 +0200
Subject: Fix WS masking logic
---
json-rpc-shell.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 10b3dd5..de42923 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -1115,7 +1115,7 @@ backend_ws_on_frame_header (void *user_data, const struct ws_parser *parser)
// connection when the frame is unmasked
if (parser->reserved_1 || parser->reserved_2 || parser->reserved_3
- || !parser->is_masked // client -> server payload must be masked
+ || parser->is_masked // server -> client payload must not be masked
|| (ws_is_control_frame (parser->opcode) &&
(!parser->is_fin || parser->payload_len > WS_MAX_CONTROL_PAYLOAD_LEN))
|| (!ws_is_control_frame (parser->opcode) &&
--
cgit v1.2.3-70-g09d2