Software /
code /
prosody
Diff
plugins/mod_bosh.lua @ 7381:a05bf94646ba
mod_bosh: Reject fractional 'wait' (See #343)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Apr 2016 12:33:58 +0200 |
parent | 7380:d24d88feed76 |
child | 7382:c8923f882274 |
child | 7387:addd041342bd |
line wrap: on
line diff
--- 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" });