Don't send ACK on subscribed chans

If somehow you manage to send a message that includes an ACK part into a
chan, the subscribers would send the ACK back. This shouldn't happen.
This commit is contained in:
Peter Šurda 2016-02-13 00:27:37 +01:00
parent 40f0ff381e
commit f43e01ed0e

View File

@ -567,11 +567,12 @@ class objectProcessor(threading.Thread):
toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdataForBroadcast))) toAddress, '[Broadcast subscribers]', fromAddress, subject, message, ackdataForBroadcast)))
shared.workerQueue.put(('sendbroadcast', '')) shared.workerQueue.put(('sendbroadcast', ''))
# Don't send ACK if invalid, blacklisted senders, invisible messages or disabled # Don't send ACK if invalid, blacklisted senders, invisible messages, disabled or chan
if self.ackDataHasAValidHeader(ackData) and \ if self.ackDataHasAValidHeader(ackData) and \
not blockMessage and \ not blockMessage and \
messageEncodingType != 0 and \ messageEncodingType != 0 and \
not shared.safeConfigGetBoolean(toAddress, 'dontsendack'): not shared.safeConfigGetBoolean(toAddress, 'dontsendack') and \
not shared.safeConfigGetBoolean(toAddress, 'chan'):
shared.checkAndShareObjectWithPeers(ackData[24:]) shared.checkAndShareObjectWithPeers(ackData[24:])
# Display timing data # Display timing data