Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 10311:1bb1e16f24b0
mod_s2s: Close with a stream error in case neither SASL or Dialback are available
This both tells the remote server and users who sent any queued stanzas
why it failed.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 06 Oct 2019 21:14:53 +0200 |
parent | 10249:790c6ae54dd6 |
child | 10381:66fa45d24481 |
comparison
equal
deleted
inserted
replaced
10310:b03065cd033a | 10311:1bb1e16f24b0 |
---|---|
182 -- so the stream is ready for stanzas. RFC 6120 Section 4.3 | 182 -- so the stream is ready for stanzas. RFC 6120 Section 4.3 |
183 mark_connected(session); | 183 mark_connected(session); |
184 return true; | 184 return true; |
185 elseif not session.dialback_verifying then | 185 elseif not session.dialback_verifying then |
186 session.log("warn", "No SASL EXTERNAL offer and Dialback doesn't seem to be enabled, giving up"); | 186 session.log("warn", "No SASL EXTERNAL offer and Dialback doesn't seem to be enabled, giving up"); |
187 session:close(); | 187 session:close({ |
188 condition = "unsupported-feature", | |
189 text = "No viable authentication method offered", | |
190 }); | |
188 return false; | 191 return false; |
189 end | 192 end |
190 end, -1); | 193 end, -1); |
191 end | 194 end |
192 | 195 |