# HG changeset patch # User Kim Alvefur # Date 1461062038 -7200 # Node ID a05bf94646bad004c19b78d5d1b38dec731705fc # Parent d24d88feed763dab349bd3760d1953f0625ecfe3 mod_bosh: Reject fractional 'wait' (See #343) diff -r d24d88feed76 -r a05bf94646ba plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Tue Apr 19 12:19:15 2016 +0200 +++ b/plugins/mod_bosh.lua Tue Apr 19 12:33:58 2016 +0200 @@ -261,7 +261,7 @@ 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" });