# HG changeset patch # User Kim Alvefur # Date 1643537451 -3600 # Node ID f60f9cd9d26c6e9541fda43ff6e27a340c796a52 # Parent 88958c0ecab37ad8738951218c120edcaed5e939 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. diff -r 88958c0ecab3 -r f60f9cd9d26c plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Sat Jan 29 16:11:38 2022 +0100 +++ b/plugins/mod_admin_shell.lua Sun Jan 30 11:10:51 2022 +0100 @@ -903,7 +903,7 @@ 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 @@ 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;