mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
For all multi-part messages, check the headers. If the header is not your minion-id or a broadcast, drop the message.
Fix for #26844
This commit is contained in:
parent
07cac0b434
commit
6d26842925
1 changed files with 5 additions and 1 deletions
|
@ -347,6 +347,9 @@ class AsyncZeroMQPubChannel(salt.transport.mixins.auth.AESPubClientMixin, salt.t
|
|||
payload = self.serial.loads(messages[0])
|
||||
# 2 includes a header which says who should do it
|
||||
elif messages_len == 2:
|
||||
if messages[0] not in ('broadcast', self.hexid):
|
||||
log.debug('Publish recieved for not this minion: {0}'.format(messages[0]))
|
||||
raise tornado.gen.Return(None)
|
||||
payload = self.serial.loads(messages[1])
|
||||
else:
|
||||
raise Exception(('Invalid number of messages ({0}) in zeromq pub'
|
||||
|
@ -377,7 +380,8 @@ class AsyncZeroMQPubChannel(salt.transport.mixins.auth.AESPubClientMixin, salt.t
|
|||
@tornado.gen.coroutine
|
||||
def wrap_callback(messages):
|
||||
payload = yield self._decode_messages(messages)
|
||||
callback(payload)
|
||||
if payload is not None:
|
||||
callback(payload)
|
||||
return self.stream.on_recv(wrap_callback)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue