From 965c93116bc5b6da63688538d6d6016f41e4a62a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 31 Jan 2012 22:41:21 +0000 Subject: prosody.cfg.lua.dist: Comment mod_legacyauth by default (thanks Zash) --- prosody.cfg.lua.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosody.cfg.lua.dist b/prosody.cfg.lua.dist index e513b116..db85a70b 100644 --- a/prosody.cfg.lua.dist +++ b/prosody.cfg.lua.dist @@ -45,7 +45,6 @@ modules_enabled = { --"compression"; -- Stream compression -- Nice to have - "legacyauth"; -- Legacy authentication. Only used by some old clients and bots. "version"; -- Replies to server version requests "uptime"; -- Report how long server has been running "time"; -- Let others know the time here on this server @@ -67,6 +66,7 @@ modules_enabled = { --"welcome"; -- Welcome users who register accounts --"watchregistrations"; -- Alert admins of registrations --"motd"; -- Send a message to users when they log in + --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots. }; -- These modules are auto-loaded, should you -- cgit v1.2.3 From e5684a78b0556e09bda2ffca2666dc8ca76f7cdb Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 16 Dec 2011 16:01:59 +0000 Subject: hostmanager: Add send() method to hosts --- core/hostmanager.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/hostmanager.lua b/core/hostmanager.lua index 9e74cd6b..0dd1d426 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -53,6 +53,17 @@ end prosody_events.add_handler("server-starting", load_enabled_hosts); +local function host_send(stanza) + local name, type = stanza.name, stanza.attr.type; + if type == "error" or (name == "iq" and type == "result") then + local dest_host_name = select(2, jid_split(stanza.attr.to)); + local dest_host = hosts[dest_host_name] or { type = "unknown" }; + log("warn", "Unhandled response sent to %s host %s: %s", dest_host.type, dest_host_name, tostring(stanza)); + return; + end + core_route_stanza(nil, stanza); +end + function activate(host, host_config) if hosts[host] then return nil, "The host "..host.." is already activated"; end host_config = host_config or configmanager.getconfig()[host]; @@ -63,6 +74,7 @@ function activate(host, host_config) events = events_new(); dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); disallow_s2s = configmanager.get(host, "core", "disallow_s2s"); + send = host_send; }; if not host_config.core.component_module then -- host host_session.type = "local"; -- cgit v1.2.3 From d75e3d56b5128e4489f635a412cb12bf02e9f18f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 8 Feb 2012 15:33:36 +0100 Subject: util.prosodyctl: In the register command, check that the virtual exists before proceeding. --- util/prosodyctl.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index d0045abc..6e9eed4e 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -121,7 +121,11 @@ function adduser(params) return false, "invalid-hostname"; end - local provider = prosody.hosts[host].users; + local host = prosody.hosts[host]; + if not host then + return false, "no-such-host"; + end + local provider = host.users; if not(provider) or provider.name == "null" then usermanager.initialize_host(host); end -- cgit v1.2.3