# HG changeset patch # User Matthew Wild # Date 1735549096 0 # Node ID 15f6f1566bdb528a1d3ae197bec82e33cd55aea7 # Parent 255ab0b81f1422a8addf5df4080dd3e54f617249 mod_anti_spam: Prevent traceback when processing a message to an unknown host I'm not currently sure what is happening here, so hopefully the log message will explain all if it happens again. diff -r 255ab0b81f14 -r 15f6f1566bdb mod_anti_spam/mod_anti_spam.lua --- a/mod_anti_spam/mod_anti_spam.lua Sun Dec 29 11:49:36 2024 +0000 +++ b/mod_anti_spam/mod_anti_spam.lua Mon Dec 30 08:58:16 2024 +0000 @@ -135,6 +135,11 @@ module:hook("message/bare", function (event) local to_user, to_host = jid_split(event.stanza.attr.to); + if not hosts[to_host] then + module:log("warn", "Skipping filtering of message to unknown host <%s>", to_host); + return; + end + if not user_exists(to_user, to_host) then return; end local from_bare = jid_bare(event.stanza.attr.from);