Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 6382:57d23c26039b
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 02 Sep 2014 22:33:11 +0200 |
parent | 6367:769a3577dd85 |
parent | 6380:4220ffb87b22 |
child | 6403:166d1bd8fc38 |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Tue Sep 02 17:58:12 2014 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Tue Sep 02 22:33:11 2014 +0200 @@ -350,8 +350,11 @@ 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 @@ 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;