Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 6378:3cec0eef0b70
mod_s2s: Close offending s2s streams missing an 'id' attribute with a stream error instead of throwing an unhandled error
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 02 Sep 2014 17:24:25 +0200 |
parent | 6364:4e93e8768c36 |
child | 6380:4220ffb87b22 |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Thu Aug 28 12:22:39 2014 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Tue Sep 02 17:24:25 2014 +0200 @@ -365,8 +365,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