Software /
code /
prosody
Changeset
7381:a05bf94646ba
mod_bosh: Reject fractional 'wait' (See #343)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Apr 2016 12:33:58 +0200 |
parents | 7380:d24d88feed76 |
children | 7382:c8923f882274 7385:17929cdacec2 |
files | plugins/mod_bosh.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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" });