aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-10 13:07:22 +0100
committerKim Alvefur <zash@zash.se>2019-01-10 13:07:22 +0100
commit447966dac6eee386ae717418733f275acc327b9e (patch)
treead294eee531a0d7ef6100226f179f44446ed6682
parent3c7a6a9e58a871d6a6740d4d9af2fc61a1df8305 (diff)
downloadprosody-447966dac6eee386ae717418733f275acc327b9e.tar.gz
prosody-447966dac6eee386ae717418733f275acc327b9e.zip
mod_bosh: Handle missing wait attribute (fixes #1288)
250855633092 did not fix this completely.
-rw-r--r--plugins/mod_bosh.lua2
1 files changed, 1 insertions, 1 deletions
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" });