plugins/mod_saslauth.lua
changeset 2014 913c0845ef9a
parent 2013 0bbbc9042361
child 2193 8fbbdb11a520
child 2784 e165414a454c
child 2860 ad534f89c758
equal deleted inserted replaced
2013:0bbbc9042361 2014:913c0845ef9a
    81 			return false;
    81 			return false;
    82 		else
    82 		else
    83 			return response;
    83 			return response;
    84 		end
    84 		end
    85 	elseif mechanism == "DIGEST-MD5" then
    85 	elseif mechanism == "DIGEST-MD5" then
    86 		function func(x) return x; end
    86 		local function func(x) return x; end
    87 		local node, domain, realm, decoder = ...;
    87 		local node, domain, realm, decoder = ...;
    88 		local prepped_node = nodeprep(node);
    88 		local prepped_node = nodeprep(node);
    89 		if not prepped_node then
    89 		if not prepped_node then
    90 			return func, nil;
    90 			return func, nil;
    91 		end
    91 		end
   151 				features:tag("mechanisms", mechanisms_attr);
   151 				features:tag("mechanisms", mechanisms_attr);
   152 				-- TODO: Provide PLAIN only if TLS is active, this is a SHOULD from the introduction of RFC 4616. This behavior could be overridden via configuration but will issuing a warning or so.
   152 				-- TODO: Provide PLAIN only if TLS is active, this is a SHOULD from the introduction of RFC 4616. This behavior could be overridden via configuration but will issuing a warning or so.
   153 					if config.get(session.host or "*", "core", "anonymous_login") then
   153 					if config.get(session.host or "*", "core", "anonymous_login") then
   154 						features:tag("mechanism"):text("ANONYMOUS"):up();
   154 						features:tag("mechanism"):text("ANONYMOUS"):up();
   155 					else
   155 					else
   156 						mechanisms = usermanager_get_supported_methods(session.host or "*");
   156 						local mechanisms = usermanager_get_supported_methods(session.host or "*");
   157 						for k, v in pairs(mechanisms) do
   157 						for k, v in pairs(mechanisms) do
   158 							features:tag("mechanism"):text(k):up();
   158 							features:tag("mechanism"):text(k):up();
   159 						end
   159 						end
   160 					end
   160 					end
   161 				features:up();
   161 				features:up();