From 45a6aed57f9abef0fbedbe913c0cf26b7ffdbce8 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 16 Jul 2025 18:08:23 +0200 Subject: [PATCH] mod_admin_extra: Run sm_kick_user event when kicking account (#4415) This is important when running the ban_account command and mod_auth_fast is enabled, as the client may store auth tokens that bypass the banning stored in private storage and enforced by ejabberd_auth. --- src/mod_admin_extra.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl index d473091ae..fc2cf8c51 100644 --- a/src/mod_admin_extra.erl +++ b/src/mod_admin_extra.erl @@ -1158,6 +1158,7 @@ ban_account(User, Host, ReasonText) -> ok. kick_sessions(User, Server, Reason) -> + ejabberd_hooks:run(sm_kick_user, Server, [User, Server]), lists:map( fun(Resource) -> kick_this_session(User, Server, Resource, Reason)