From 6af9beaccf1f42a76f6128fab0d6462b8059a6d7 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 26 Aug 2014 12:00:51 +0200 Subject: prosodyctl: Verify that 'pidfile' is a string, show friendly error otherwise --- util/prosodyctl.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util') diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index b80a69f2..c6fe1986 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -188,6 +188,10 @@ function getpid() if not pidfile then return false, "no-pidfile"; end + + if type(pidfile) ~= "string" then + return false, "invalid-pidfile"; + end local modules_enabled = set.new(config.get("*", "modules_enabled")); if not modules_enabled:contains("posix") then -- cgit v1.2.3 From 1bb5caff25d1a15f0d89f4b4c8c29f30d52d5f67 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 23 Aug 2014 09:22:05 +0100 Subject: util.xmppstream: When error is 'no-stream', pass the received tagname to the error handler --- util/xmppstream.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 73f5e314..138c86b7 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -109,7 +109,7 @@ function new_sax_handlers(session, stream_callbacks, cb_handleprogress) end else -- Garbage before stream? - cb_error(session, "no-stream"); + cb_error(session, "no-stream", tagname); end return; end -- cgit v1.2.3 From b27e7b3834519214f9b3c9e6e041421429bbcc74 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 28 Aug 2014 09:20:33 +0100 Subject: util.filters: Ignore filters being added twice (fixes issues on removal) --- util/filters.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util') diff --git a/util/filters.lua b/util/filters.lua index d24bd33e..6290e53b 100644 --- a/util/filters.lua +++ b/util/filters.lua @@ -45,6 +45,8 @@ function add_filter(session, type, callback, priority) if not filter_list then filter_list = {}; session.filters[type] = filter_list; + elseif filter_list[callback] then + return; -- Filter already added end priority = priority or 0; -- cgit v1.2.3