aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-03-26 09:25:20 +0100
committerKim Alvefur <zash@zash.se>2013-03-26 09:25:20 +0100
commite3b9a1075ecd03ef653f0598364e4ec373d66651 (patch)
tree22cc8803ee1a0f23c8f9cd9def3b773ad3b10df8
parent854db75cc239f511d266325edf15bd3182d68519 (diff)
downloadprosody-e3b9a1075ecd03ef653f0598364e4ec373d66651.tar.gz
prosody-e3b9a1075ecd03ef653f0598364e4ec373d66651.zip
mod_s2s: Prevent traceback when replying to incoming connection to a host we don't serve
-rw-r--r--plugins/mod_s2s/mod_s2s.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index dc4d727d..0d552ce8 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -486,7 +486,7 @@ function session_open_stream(session, from, to)
from = from, to = to,
}
local local_host = session.direction == "outgoing" and from or to;
- if not local_host or hosts[local_host].modules.dialback then
+ if not local_host or (hosts[local_host] and hosts[local_host].modules.dialback) then
attr["xmlns:db"] = 'jabber:server:dialback';
end