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
commit4053cdb8483f896e9d36d360e4df9735b9ea00ad (patch)
tree5c0eac251f8738cd01cbe1442687c2bf75b09c49
parenta149dda0e3b1c4a37ba1e6019930952374a3992c (diff)
downloadprosody-4053cdb8483f896e9d36d360e4df9735b9ea00ad.tar.gz
prosody-4053cdb8483f896e9d36d360e4df9735b9ea00ad.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);