aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-13 15:34:53 +0100
committerKim Alvefur <zash@zash.se>2017-12-13 15:34:53 +0100
commit69f252bebf22299c0da92804238fd6fbacc0dcca (patch)
treed31516098621c7fad751bd7a570807d2c70c983c /plugins
parentc468196063ef69759758680038f583d8ed0aee21 (diff)
downloadprosody-69f252bebf22299c0da92804238fd6fbacc0dcca.tar.gz
prosody-69f252bebf22299c0da92804238fd6fbacc0dcca.zip
mod_bosh: Limit stream to current host (fixes #371)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua3
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",