From 5318bf37436a9a8ec09950db87a879488bbc98e8 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 29 May 2020 12:43:28 +0200 Subject: [PATCH] If stanza is type error, allow it passing (#3290) --- src/mod_block_strangers.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod_block_strangers.erl b/src/mod_block_strangers.erl index 82b8f4bb2..92f52236d 100644 --- a/src/mod_block_strangers.erl +++ b/src/mod_block_strangers.erl @@ -208,9 +208,10 @@ need_check(Pkt) -> _ -> false end, + IsError = (error == xmpp:get_type(Pkt)), AllowLocalUsers = mod_block_strangers_opt:allow_local_users(LServer), Access = mod_block_strangers_opt:access(LServer), - not (IsSelf orelse IsEmpty + not (IsSelf orelse IsEmpty orelse IsError orelse acl:match_rule(LServer, Access, From) == allow orelse ((AllowLocalUsers orelse From#jid.luser == <<"">>) andalso ejabberd_router:is_my_host(From#jid.lserver))).