PT_SAY: check that source matches packet source

This commit is contained in:
AJ Martinez 2023-04-29 17:21:44 -07:00
parent cb8e48d8a7
commit 42251419e0

View file

@ -5243,9 +5243,13 @@ static void HandlePacketFromPlayer(SINT8 node)
break;
case PT_SAY:
if (client)
break;
break; // Only sent to servers, why are we receiving this?
say_pak say = netbuffer->u.say;
if (playernode[say.source] != node)
break; // Spoofed source!
DoSayCommand(say.message, say.target, say.flags, say.source);
break;
case PT_LOGIN: