diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-03-14 16:05:22 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-03-14 16:05:22 +0000 |
commit | bcd9d386bf3d145872796dd6bb183a34bf64b2f8 (patch) | |
tree | 3191e9e9af444ce237f12aa322c891fea9aefc17 /plugins/mod_saslauth.lua | |
parent | 94692c20efb3c0edc09710f509c0c310e5c9d0c1 (diff) | |
parent | d2ebe25dc579fb0ab21e411518c50eee1fae0f99 (diff) | |
download | prosody-bcd9d386bf3d145872796dd6bb183a34bf64b2f8.tar.gz prosody-bcd9d386bf3d145872796dd6bb183a34bf64b2f8.zip |
Merge
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r-- | plugins/mod_saslauth.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index ed19a150..4804607b 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -17,6 +17,7 @@ local t_concat, t_insert = table.concat, table.insert; local tostring = tostring; local jid_split = require "util.jid".split local md5 = require "util.hashes".md5; +local config = require "core.configmanager"; local log = require "util.logger".init("mod_saslauth"); @@ -106,7 +107,9 @@ module:add_event_hook("stream-features", -- TODO: Provide PLAIN only if TLS is active, this is a SHOULD from the introduction of RFC 4616. This behavior could be overridden via configuration but will issuing a warning or so. features:tag("mechanism"):text("PLAIN"):up(); features:tag("mechanism"):text("DIGEST-MD5"):up(); - features:tag("mechanism"):text("ANONYMOUS"):up(); + if config.get(session.host or "*", "core", "sasl_anonymous") then + features:tag("mechanism"):text("ANONYMOUS"):up(); + end features:up(); else features:tag("bind", bind_attr):tag("required"):up():up(); |