Mercurial > prosody-hg
diff plugins/mod_saslauth.lua @ 893:cec476fcc19f
Automated merge with http://waqas.ath.cx:8000/
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 08 Mar 2009 03:38:22 +0000 |
| parents | eef21d7bbe04 |
| children | 2c0b9e3c11c3 |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Sun Mar 08 05:03:22 2009 +0500 +++ b/plugins/mod_saslauth.lua Sun Mar 08 03:38:22 2009 +0000 @@ -17,6 +17,7 @@ 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 @@ -- 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();
