aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-08-26 12:00:51 +0200
committerKim Alvefur <zash@zash.se>2014-08-26 12:00:51 +0200
commit6af9beaccf1f42a76f6128fab0d6462b8059a6d7 (patch)
treea7c9626534da045d2ad473fa6f8e57f395f85c30 /util/prosodyctl.lua
parent56339d76da26b41c723b5b44d660f9462622a3b4 (diff)
downloadprosody-6af9beaccf1f42a76f6128fab0d6462b8059a6d7.tar.gz
prosody-6af9beaccf1f42a76f6128fab0d6462b8059a6d7.zip
prosodyctl: Verify that 'pidfile' is a string, show friendly error otherwise
Diffstat (limited to 'util/prosodyctl.lua')
-rw-r--r--util/prosodyctl.lua4
1 files changed, 4 insertions, 0 deletions
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