From 420ed7d932fa4534a10ccbd57782cf2bf9b8ff41 Mon Sep 17 00:00:00 2001 From: eleksir Date: Mon, 13 Nov 2023 22:22:06 +0300 Subject: [PATCH] Do not exclude resource while checking evil jid against blacklist --- buny.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buny.go b/buny.go index fa4815a..c2ff976 100644 --- a/buny.go +++ b/buny.go @@ -83,9 +83,9 @@ func bunyPresense(v xmpp.Presence) error { //nolint:gocognit,gocyclo continue } - log.Debugf("Checking jid %s vs global blacklist regex %s", evilJid, jidRegexp) + log.Debugf("Checking jid %s vs global blacklist regex %s", v.JID, jidRegexp) - if re.MatchString(evilJid) { + if re.MatchString(v.JID) { log.Warnf( "Hammer falls on %s (%s): jid matches with global blacklist entry: %s", v.From, @@ -167,9 +167,9 @@ func bunyPresense(v xmpp.Presence) error { //nolint:gocognit,gocyclo continue } - log.Debugf("Checking jid %s vs room %s blacklist regex %s", evilJid, room, jidRegexp) + log.Debugf("Checking jid %s vs room %s blacklist regex %s", v.JID, room, jidRegexp) - if re.MatchString(evilJid) { + if re.MatchString(v.JID) { log.Warnf( "Hammer falls on %s (%s): jid matches with room blacklist entry: %s", v.From,