From be1b9e55c0d03d04c69895355b974447b5fa21ab Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 6 Sep 2009 01:31:18 +0500 Subject: modulemanager: Fixed: Internally generated stanzas could be missing namespaces, which causes tracebacks in logging (e.g., auto-generated offline presence) --- core/modulemanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 0c9ef581..250551ed 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -235,7 +235,7 @@ function reload(host, name, ...) end function handle_stanza(host, origin, stanza) - local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns, origin.type; + local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type; if name == "iq" and xmlns == "jabber:client" then if stanza.attr.type == "get" or stanza.attr.type == "set" then xmlns = stanza.tags[1].attr.xmlns or "jabber:client"; -- cgit v1.2.3 From 55f1133e4e3af74bc342c042d05d777b096f0cbf Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 6 Sep 2009 01:32:36 +0500 Subject: mod_presence: Fixed: Don't recursively handle inbound presence directed at local host --- plugins/mod_presence.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua index f78a5950..d696612d 100644 --- a/plugins/mod_presence.lua +++ b/plugins/mod_presence.lua @@ -29,7 +29,7 @@ function core_route_stanza(origin, stanza) if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then local node, host = jid_split(stanza.attr.to); host = hosts[host]; - if host and host.type == "local" then + if node and host and host.type == "local" then handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza); return; end -- cgit v1.2.3 From c1e71bdec84a2ac4c5ab5bca75854a9e36464612 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 6 Sep 2009 01:33:41 +0500 Subject: datamanager: Fixed logging errors on deletion of datastores not owned by a user@host --- util/datamanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/datamanager.lua b/util/datamanager.lua index dcc35bb5..4d07d6cc 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -137,7 +137,7 @@ function store(username, host, datastore, data) append(f, data); f:close(); if next(data) == nil then -- try to delete empty datastore - log("debug", "Removing empty %s datastore for user %s@%s", datastore, username, host); + log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil"); os_remove(getpath(username, host, datastore)); end -- we write data even when we are deleting because lua doesn't have a @@ -179,7 +179,7 @@ function list_store(username, host, datastore, data) end f:close(); if next(data) == nil then -- try to delete empty datastore - log("debug", "Removing empty %s datastore for user %s@%s", datastore, username, host); + log("debug", "Removing empty %s datastore for user %s@%s", datastore, username or "nil", host or "nil"); os_remove(getpath(username, host, datastore, "list")); end -- we write data even when we are deleting because lua doesn't have a -- cgit v1.2.3