Software /
code /
prosody
Changeset
12228:f60f9cd9d26c
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Jan 2022 11:10:51 +0100 |
parents | 12227:88958c0ecab3 |
children | 12229:30ea791ce817 |
files | plugins/mod_admin_shell.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;