Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 6033:0d6f23049e95
mod_saslauth: Only do c2s SASL on normal VirtualHosts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Mar 2014 12:41:38 +0100 |
parent | 5535:0df0afc041d7 |
child | 6038:b3ceb7627e27 |
child | 7939:6940d6db970b |
comparison
equal
deleted
inserted
replaced
6030:9b91242cc137 | 6033:0d6f23049e95 |
---|---|
195 local session, stanza = event.origin, event.stanza; | 195 local session, stanza = event.origin, event.stanza; |
196 if session.type == "s2sin_unauthed" then | 196 if session.type == "s2sin_unauthed" then |
197 return s2s_external_auth(session, stanza) | 197 return s2s_external_auth(session, stanza) |
198 end | 198 end |
199 | 199 |
200 if session.type ~= "c2s_unauthed" then return; end | 200 if session.type ~= "c2s_unauthed" or module:get_host_type() ~= "local" then return; end |
201 | 201 |
202 if session.sasl_handler and session.sasl_handler.selected then | 202 if session.sasl_handler and session.sasl_handler.selected then |
203 session.sasl_handler = nil; -- allow starting a new SASL negotiation before completing an old one | 203 session.sasl_handler = nil; -- allow starting a new SASL negotiation before completing an old one |
204 end | 204 end |
205 if not session.sasl_handler then | 205 if not session.sasl_handler then |