Mercurial > prosody-modules
comparison mod_sasl2/mod_sasl2.lua @ 6111:ce755c661036
mod_sasl2: revert changes that should not have been committed
| author | tmolitor <thilo@eightysoft.de> |
|---|---|
| date | Sun, 05 Jan 2025 18:01:47 +0100 |
| parents | 8da64ecdbcaa |
| children | 045abdc53ba4 |
comparison
equal
deleted
inserted
replaced
| 6110:9db1529c06c2 | 6111:ce755c661036 |
|---|---|
| 84 end | 84 end |
| 85 end | 85 end |
| 86 | 86 |
| 87 local mechanisms = st.stanza("authentication", { xmlns = xmlns_sasl2 }); | 87 local mechanisms = st.stanza("authentication", { xmlns = xmlns_sasl2 }); |
| 88 | 88 |
| 89 origin.usable_mechanisms = set.new(); | |
| 90 local available_mechanisms = sasl_handler:mechanisms() | 89 local available_mechanisms = sasl_handler:mechanisms() |
| 91 for mechanism in pairs(available_mechanisms) do | 90 for mechanism in pairs(available_mechanisms) do |
| 92 if disabled_mechanisms:contains(mechanism) then | 91 if disabled_mechanisms:contains(mechanism) then |
| 93 log("debug", "Not offering disabled mechanism %s", mechanism); | 92 log("debug", "Not offering disabled mechanism %s", mechanism); |
| 94 elseif not origin.secure and insecure_mechanisms:contains(mechanism) then | 93 elseif not origin.secure and insecure_mechanisms:contains(mechanism) then |
| 95 log("debug", "Not offering mechanism %s on insecure connection", mechanism); | 94 log("debug", "Not offering mechanism %s on insecure connection", mechanism); |
| 96 else | 95 else |
| 97 log("debug", "Offering mechanism %s", mechanism); | 96 log("debug", "Offering mechanism %s", mechanism); |
| 98 mechanisms:text_tag("mechanism", mechanism); | 97 mechanisms:text_tag("mechanism", mechanism); |
| 99 origin.usable_mechanisms:add(mechanism); | |
| 100 end | 98 end |
| 101 end | 99 end |
| 102 | 100 |
| 103 features:add_direct_child(mechanisms); | 101 features:add_direct_child(mechanisms); |
| 104 | 102 |
