From aea3b6d32d2ddc7bef8eaf6e07e6f490e86f46be 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