Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 10481:7a3c04789d5c
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 02 Dec 2019 16:00:16 +0100 |
parent | 10340:5c6912289ce3 |
child | 10487:02ccf2fbf000 |
comparison
equal
deleted
inserted
replaced
10480:94cacf9fd0ae | 10481:7a3c04789d5c |
---|---|
284 usable_mechanisms = usable_mechanisms - insecure_mechanisms; | 284 usable_mechanisms = usable_mechanisms - insecure_mechanisms; |
285 end | 285 end |
286 | 286 |
287 if not usable_mechanisms:empty() then | 287 if not usable_mechanisms:empty() then |
288 log("debug", "Offering usable mechanisms: %s", usable_mechanisms); | 288 log("debug", "Offering usable mechanisms: %s", usable_mechanisms); |
289 for mechanism in available_mechanisms do | 289 for mechanism in usable_mechanisms do |
290 mechanisms:tag("mechanism"):text(mechanism):up(); | 290 mechanisms:tag("mechanism"):text(mechanism):up(); |
291 end | 291 end |
292 features:add_child(mechanisms); | 292 features:add_child(mechanisms); |
293 return; | 293 return; |
294 end | 294 end |