aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_shell.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-01-30 11:10:51 +0100
committerKim Alvefur <zash@zash.se>2022-01-30 11:10:51 +0100
commitb5a87898ee5cd3a1626f84082bbcd1e56aa2e4a3 (patch)
tree95bae9e10c3fda428d85ff15ba55194ea4cd8e52 /plugins/mod_admin_shell.lua
parentca19260145f1bfea476329f2939fe9e46e09a5a6 (diff)
downloadprosody-b5a87898ee5cd3a1626f84082bbcd1e56aa2e4a3.tar.gz
prosody-b5a87898ee5cd3a1626f84082bbcd1e56aa2e4a3.zip
mod_admin_shell: Use exact match instead of Lua patterns in c2s,s2s:show
It is unexpected that 'example.com' matches 'exampleicom.org' and this use of Lua patterns is undocumented and unlikely to be widely known or used.
Diffstat (limited to 'plugins/mod_admin_shell.lua')
-rw-r--r--plugins/mod_admin_shell.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index c2887940..46509755 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -903,7 +903,7 @@ function def_env.c2s:show(match_jid, colspec)
local function match(session)
local jid = get_jid(session)
- return (not match_jid) or jid:match(match_jid)
+ return (not match_jid) or jid == match_jid;
end
local group_by_host = true;
@@ -986,7 +986,7 @@ function def_env.s2s:show(match_jid, colspec)
local function match(session)
local host, remote = get_s2s_hosts(session);
- return not match_jid or (host or ""):match(match_jid) or (remote or ""):match(match_jid);
+ return not match_jid or host == match_jid or remote == match_jid;
end
local group_by_host = true;