aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-02 16:00:16 +0100
committerKim Alvefur <zash@zash.se>2019-12-02 16:00:16 +0100
commit947c10c689ea46a5ceff8c577bffb88b8371064a (patch)
tree5c0eac251f8738cd01cbe1442687c2bf75b09c49
parent83a7665a0e5e1b2bee53d7331f012cdfa323f191 (diff)
downloadprosody-947c10c689ea46a5ceff8c577bffb88b8371064a.tar.gz
prosody-947c10c689ea46a5ceff8c577bffb88b8371064a.zip
mod_saslauth: Advertise correct set of mechanisms
Mistakenly iterates over the set of all supported mechanisms instead of the one without insecure mechanisms if the connection is insecure. Not a problem if c2s_require_encryption is true Introduced in 56a0f68b7797
-rw-r--r--plugins/mod_saslauth.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 9e9091d3..30d74b9e 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -286,7 +286,7 @@ module:hook("stream-features", function(event)
if not usable_mechanisms:empty() then
log("debug", "Offering usable mechanisms: %s", usable_mechanisms);
- for mechanism in available_mechanisms do
+ for mechanism in usable_mechanisms do
mechanisms:tag("mechanism"):text(mechanism):up();
end
features:add_child(mechanisms);