aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-09-02 22:34:32 +0200
committerKim Alvefur <zash@zash.se>2014-09-02 22:34:32 +0200
commitc47fa42628b2119f7e37e83f22919bc905a53624 (patch)
tree5ae5bb832b9e41b4812e12421bb70daf1c3b7446 /plugins/mod_s2s
parent46105d64bf9627c8618624281c966ec784f4fc12 (diff)
parentc80b30a71ceb555bb33d14c3c7dbee0a8c93eaee (diff)
downloadprosody-c47fa42628b2119f7e37e83f22919bc905a53624.tar.gz
prosody-c47fa42628b2119f7e37e83f22919bc905a53624.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_s2s')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index 8614b857..0a2b5bb7 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -350,8 +350,11 @@ function stream_callbacks.streamopened(session, attr)
session.notopen = nil;
elseif session.direction == "outgoing" then
session.notopen = nil;
- -- If we are just using the connection for verifying dialback keys, we won't try and auth it
- if not attr.id then error("stream response did not give us a streamid!!!"); end
+ if not attr.id then
+ log("error", "Stream response did not give us a stream id!");
+ session:close({ condition = "undefined-condition", text = "Missing stream ID" });
+ return;
+ end
session.streamid = attr.id;
if session.secure and not session.cert_chain_status then
@@ -617,6 +620,10 @@ function listener.register_outgoing(conn, session)
initialize_session(session);
end
+function listener.ondetach(conn)
+ sessions[conn] = nil;
+end
+
function check_auth_policy(event)
local host, session = event.host, event.session;
local must_secure = secure_auth;