Mercurial > prosody-hg
diff plugins/mod_websocket.lua @ 10581:10d6d0d91f4e 0.11 0.11.4
mod_websocket: Clear mask bit when reflecting ping frames (fixes #1484)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 02 Jan 2020 10:49:37 +0100 |
| parents | 4b3c129e96f2 |
| children | 6d4562acef81 37936c72846d |
line wrap: on
line diff
--- a/plugins/mod_websocket.lua Tue Dec 31 02:50:25 2019 +0100 +++ b/plugins/mod_websocket.lua Thu Jan 02 10:49:37 2020 +0100 @@ -236,6 +236,7 @@ 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
