mod_saslauth: Only do c2s SASL on normal VirtualHosts
authorKim Alvefur <zash@zash.se>
Sat, 22 Mar 2014 11:41:38 +0000 (12:41 +0100)
committerKim Alvefur <zash@zash.se>
Sat, 22 Mar 2014 11:41:38 +0000 (12:41 +0100)
plugins/mod_saslauth.lua

index 201cc477de9eed5980a6ec31eaeb6a298afd5b21..c5d3dc917bd847b00869efc563ccc0640f75aca6 100644 (file)
@@ -197,7 +197,7 @@ module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:auth", function(event)
                return s2s_external_auth(session, stanza)
        end
 
-       if session.type ~= "c2s_unauthed" then return; end
+       if session.type ~= "c2s_unauthed" or module:get_host_type() ~= "local" then return; end
 
        if session.sasl_handler and session.sasl_handler.selected then
                session.sasl_handler = nil; -- allow starting a new SASL negotiation before completing an old one