From fbbbe28278960a83df9f5c5bc90e2e2976db6f4f Mon Sep 17 00:00:00 2001 From: Neil Twigg Date: Wed, 12 Jul 2023 13:25:46 +0100 Subject: [PATCH] Evaluate service imports when publishing advisories Signed-off-by: Neil Twigg --- server/client.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/client.go b/server/client.go index 73227f61..9d744914 100644 --- a/server/client.go +++ b/server/client.go @@ -3127,20 +3127,14 @@ var needFlush = struct{}{} // deliverMsg will deliver a message to a matching subscription and its underlying client. // We process all connection/client types. mh is the part that will be protocol/client specific. func (c *client) deliverMsg(prodIsMQTT bool, sub *subscription, acc *Account, subject, reply, mh, msg []byte, gwrply bool) bool { - // Check sub client and check echo - if sub.client == nil || c == sub.client && !sub.client.echo { + // Check sub client and check echo. Only do this if not an internal sub. + if sub.client == nil || (c == sub.client && !sub.client.echo && sub.icb == nil) { return false } client := sub.client client.mu.Lock() - // Check echo - if c == client && !client.echo { - client.mu.Unlock() - return false - } - // Check if we have a subscribe deny clause. This will trigger us to check the subject // for a match against the denied subjects. if client.mperms != nil && client.checkDenySub(string(subject)) {