From 5cd064035a3ea63781edff625c4f402ca7cb3670 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 10 Jan 2019 13:07:22 +0100 Subject: mod_bosh: Handle missing wait attribute (fixes #1288) 250855633092 did not fix this completely. --- plugins/mod_bosh.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_bosh.lua') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 251ef740..d4701148 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -277,7 +277,7 @@ function stream_callbacks.streamopened(context, attr) response:send(tostring(close_reply)); return; end - if not rid or (not wait and attr.wait or wait < 0 or wait % 1 ~= 0) then + if not rid or (not attr.wait or not wait or wait < 0 or wait % 1 ~= 0) then log("debug", "BOSH client sent invalid rid or wait attributes: rid=%s, wait=%s", tostring(attr.rid), tostring(attr.wait)); local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", ["xmlns:stream"] = xmlns_streams, condition = "bad-request" }); -- cgit v1.2.3