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
commit2410d3246c6caf796866e875240b4c2b6278312a (patch)
tree94fb4719e7df03fc329268f5a9b340d494975515
parent429871c36f88477a37dc312bb65d79b49e0121f4 (diff)
downloadprosody-2410d3246c6caf796866e875240b4c2b6278312a.tar.gz
prosody-2410d3246c6caf796866e875240b4c2b6278312a.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