aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-01-02 10:49:37 +0100
committerKim Alvefur <zash@zash.se>2020-01-02 10:49:37 +0100
commiteb7a71a64584c9d83be6a3c4a24efb39a202830a (patch)
treed7e0a0721daa5e5ebbfa560cbf3c1eaa7b4ba8ae
parentprosodyctl: Print a blank line to improve spacing and readability (diff)
downloadprosody-eb7a71a64584c9d83be6a3c4a24efb39a202830a.tar.xz
prosody-eb7a71a64584c9d83be6a3c4a24efb39a202830a.zip
mod_websocket: Clear mask bit when reflecting ping frames (fixes #1484)0.11.4
-rw-r--r--plugins/mod_websocket.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index 686a89815..6625c6760 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -236,6 +236,7 @@ function handle_request(event)
return;
elseif opcode == 0x9 then -- Ping frame
frame.opcode = 0xA;
+ frame.MASK = false; -- Clients send masked frames, servers don't, see #1484
conn:write(build_frame(frame));
return "";
elseif opcode == 0xA then -- Pong frame, MAY be sent unsolicited, eg as keepalive