Mercurial > prosody-hg
comparison plugins/mod_saslauth.lua @ 6424:89c42aff8510
mod_dialback, mod_saslauth: Remove broken fallback to dialback on SASL EXTERNAL failure
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 23 Sep 2014 14:23:01 +0200 |
| parents | 76699a0ae4c4 |
| children | 436a670a0189 |
comparison
equal
deleted
inserted
replaced
| 6422:6d4d87a89026 | 6424:89c42aff8510 |
|---|---|
| 97 if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end | 97 if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end |
| 98 | 98 |
| 99 module:log("info", "SASL EXTERNAL with %s failed", session.to_host) | 99 module:log("info", "SASL EXTERNAL with %s failed", session.to_host) |
| 100 -- TODO: Log the failure reason | 100 -- TODO: Log the failure reason |
| 101 session.external_auth = "failed" | 101 session.external_auth = "failed" |
| 102 session:close(); | |
| 103 return true; | |
| 102 end, 500) | 104 end, 500) |
| 103 | |
| 104 module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) | |
| 105 -- TODO: Dialback wasn't loaded. Do something useful. | |
| 106 end, 90) | |
| 107 | 105 |
| 108 module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) | 106 module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) |
| 109 if session.type ~= "s2sout_unauthed" or not session.secure then return; end | 107 if session.type ~= "s2sout_unauthed" or not session.secure then return; end |
| 110 | 108 |
| 111 local mechanisms = stanza:get_child("mechanisms", xmlns_sasl) | 109 local mechanisms = stanza:get_child("mechanisms", xmlns_sasl) |
