Always check publish perms for leafnode delivery

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2020-06-16 13:34:53 -07:00
parent 98f84bdbc8
commit 3729552a37

View File

@@ -2707,8 +2707,8 @@ func (c *client) deliverMsg(sub *subscription, subject, mh, msg []byte, gwrply b
return false
}
// Check if we are a spoke leafnode and have perms to check.
if client.isSpokeLeafNode() && client.perms != nil {
// Check if we are a leafnode and have perms to check.
if client.kind == LEAF && client.perms != nil {
if !client.pubAllowed(string(subject)) {
client.mu.Unlock()
return false