aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-19 12:33:58 +0200
committerKim Alvefur <zash@zash.se>2016-04-19 12:33:58 +0200
commitacd12fcc61d2e0a23db0b938fbb0ed0215f86c11 (patch)
tree4912755d76037fe62406f85263a1c7c43114704d /plugins
parenta0757fdf8530bdaa2c56118c9cc0a5c784dd4697 (diff)
downloadprosody-acd12fcc61d2e0a23db0b938fbb0ed0215f86c11.tar.gz
prosody-acd12fcc61d2e0a23db0b938fbb0ed0215f86c11.zip
mod_bosh: Reject fractional 'wait' (See #343)
Diffstat (limited to 'plugins')
-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 1f928eed..d317e4b9 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -261,7 +261,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) then
+ if not rid or (not wait and attr.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" });