local secure_auth_only = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", false));
local allow_unencrypted_plain_auth = module:get_option_boolean("allow_unencrypted_plain_auth", false)
local insecure_mechanisms = module:get_option_set("insecure_sasl_mechanisms", allow_unencrypted_plain_auth and {} or {"PLAIN", "LOGIN"});
-local disabled_mechanisms = module:get_option_set("disable_sasl_mechanisms", {});
+local disabled_mechanisms = module:get_option_set("disable_sasl_mechanisms", { "DIGEST-MD5" });
local log = module._log;
end);
local function tls_unique(self)
- return self.userdata:getpeerfinished();
+ return self.userdata["tls-unique"]:getpeerfinished();
end
local mechanisms_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-sasl' };
if socket.getpeerfinished then
sasl_handler:add_cb_handler("tls-unique", tls_unique);
end
- sasl_handler["userdata"] = socket;
+ sasl_handler["userdata"] = {
+ ["tls-unique"] = socket;
+ };
end
end
local mechanisms = st.stanza("mechanisms", mechanisms_attr);