Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 8510:149e98f88680
mod_saslauth: Close connection if no fallback kicks in on SASL EXTERNAL failure
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 04 Feb 2018 00:58:38 +0100 |
parent | 8509:e1d274001855 |
child | 8511:dd7b8888636e |
comparison
equal
deleted
inserted
replaced
8509:e1d274001855 | 8510:149e98f88680 |
---|---|
111 | 111 |
112 session.external_auth = "failed" | 112 session.external_auth = "failed" |
113 end, 500) | 113 end, 500) |
114 | 114 |
115 module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) | 115 module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) |
116 -- TODO: Dialback wasn't loaded. Do something useful. | 116 session.log("debug", "No fallback from SASL EXTERNAL failure, giving up"); |
117 session:close(); | |
118 return true; | |
117 end, 90) | 119 end, 90) |
118 | 120 |
119 module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza) | 121 module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza) |
120 if session.type ~= "s2sout_unauthed" or not session.secure then return; end | 122 if session.type ~= "s2sout_unauthed" or not session.secure then return; end |
121 | 123 |