mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 20:20:30 +00:00
Check for valid nSender field on RedNet message receive (#1200)
This commit is contained in:
parent
0f1f5247ca
commit
c919011a7e
@ -463,6 +463,7 @@ function run()
|
|||||||
if channel == id_as_channel() or channel == CHANNEL_BROADCAST then
|
if channel == id_as_channel() or channel == CHANNEL_BROADCAST then
|
||||||
if type(message) == "table" and type(message.nMessageID) == "number"
|
if type(message) == "table" and type(message.nMessageID) == "number"
|
||||||
and message.nMessageID == message.nMessageID and not received_messages[message.nMessageID]
|
and message.nMessageID == message.nMessageID and not received_messages[message.nMessageID]
|
||||||
|
and (type(message.nSender) == "nil" or (type(message.nSender) == "number" and message.nSender == message.nSender))
|
||||||
and ((message.nRecipient and message.nRecipient == os.getComputerID()) or channel == CHANNEL_BROADCAST)
|
and ((message.nRecipient and message.nRecipient == os.getComputerID()) or channel == CHANNEL_BROADCAST)
|
||||||
and isOpen(modem)
|
and isOpen(modem)
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user