From b61e2998f3cd791d29dc5f6f8bb44394b5414cf2 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 3 Apr 2018 21:14:56 -0500 Subject: [PATCH] Fix exploit to reset player by sending wrong serverId If client sends wrong serverId but is already active in the world (CS_ACTIVE) don't resend initial gamestate for the map. This isn't a valid situation. The player should be CS_CONNECTED or CS_PRIMED. Resending gamestate to an active player will cause them to respawn without dying or disconnecting. If the player had a CTF flag it gets lost until the map is changed or restarted. Reported by Ensiform at: https://bugzilla.icculus.org/show_bug.cgi?id=6324 --- code/server/sv_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 3d3ab6e1..b41421cc 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -1948,7 +1948,7 @@ void SV_ExecuteClientMessage( client_t *cl, msg_t *msg ) { } // if we can tell that the client has dropped the last // gamestate we sent them, resend it - if ( cl->messageAcknowledge > cl->gamestateMessageNum ) { + if ( cl->state != CS_ACTIVE && cl->messageAcknowledge > cl->gamestateMessageNum ) { Com_DPrintf( "%s : dropped gamestate, resending\n", cl->name ); SV_SendClientGameState( cl ); }