aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-10-12 18:33:24 +0200
committerKim Alvefur <zash@zash.se>2012-10-12 18:33:24 +0200
commitd6242f152988f935fdf15225850b0543be1ac818 (patch)
tree94fb4719e7df03fc329268f5a9b340d494975515
parent39cfeeebc208a6a6b85e1e2353171c73e77c3cd7 (diff)
downloadprosody-d6242f152988f935fdf15225850b0543be1ac818.tar.gz
prosody-d6242f152988f935fdf15225850b0543be1ac818.zip
mod_admin_telnet: user:list() check that the given host exists
-rw-r--r--plugins/mod_admin_telnet.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 9d3186d6..9e8d00ec 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -956,6 +956,8 @@ end
function def_env.user:list(host)
if not host then
return nil, "No host given";
+ elseif not hosts[host] then
+ return nil, "No such host";
end
local print = self.session.print;
for user in um.users(host) do