diff options
author | Kim Alvefur <zash@zash.se> | 2017-12-13 15:34:53 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-12-13 15:34:53 +0100 |
commit | 9a3dde476515ce879bc79b4017c25f5dbe164759 (patch) | |
tree | d31516098621c7fad751bd7a570807d2c70c983c | |
parent | b9d5e182b80b66aafb638d765deb87f3bff9dc9c (diff) | |
download | prosody-9a3dde476515ce879bc79b4017c25f5dbe164759.tar.gz prosody-9a3dde476515ce879bc79b4017c25f5dbe164759.zip |
mod_bosh: Limit stream to current host (fixes #371)
-rw-r--r-- | plugins/mod_bosh.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index d75a9e45..2cb63bdf 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -6,7 +6,6 @@ -- COPYING file in the source package for more information. -- -local hosts = _G.hosts; local new_xmpp_stream = require "util.xmppstream".new; local sm = require "core.sessionmanager"; local sm_destroy_session = sm.destroy_session; @@ -283,7 +282,7 @@ function stream_callbacks.streamopened(context, attr) ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); response:send(tostring(close_reply)); return; - elseif not hosts[to_host] then + elseif to_host ~= module.host then -- Unknown host log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |