Mercurial > prosody-modules
changeset 6409:fb7d5c80dc40
mod_anti_spam: Skip user existence check when no username (thanks Link Mauve)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 18 Feb 2026 17:01:42 +0000 |
| parents | 7fe484e7b574 |
| children | f45c84d98cde |
| files | mod_anti_spam/mod_anti_spam.lua |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_anti_spam/mod_anti_spam.lua Wed Feb 18 16:35:30 2026 +0100 +++ b/mod_anti_spam/mod_anti_spam.lua Wed Feb 18 17:01:42 2026 +0000 @@ -183,7 +183,7 @@ end local from_bare = jid_bare(event.stanza.attr.from); - if user_exists(to_user, to_host) then + if to_user and user_exists(to_user, to_host) then if not is_from_stranger(from_bare, event) then return; end @@ -215,7 +215,7 @@ local to_user, to_host = jid_split(event.stanza.attr.to); local from_bare = jid_bare(event.stanza.attr.from); - if user_exists(to_user, to_host) then + if to_user and user_exists(to_user, to_host) then if not is_from_stranger(from_bare, event) then return; end
