From 3e6d9af3d47f990ea44a92c2c46a0a4aa0fa8de4 Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Thu, 22 Jan 2009 04:08:45 +0000 Subject: [PATCH] Ugh, when a player changes a userinfo string, please don't send the update to all connected players n times, but just 1 time. 'Fixes' the 'crashes' on busy servers, but the real problem is still there: Too much client input can clog up the server, effectively causing a DoS. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3103 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_user.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index e50274d04..1b3f76cb5 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -3034,10 +3034,10 @@ void SV_SetInfo_f (void) { if (basic || (client->fteprotocolextensions & PEXT_BIGUSERINFOS)) { - MSG_WriteByte (&sv.reliable_datagram, svc_setinfo); - MSG_WriteByte (&sv.reliable_datagram, i); - MSG_WriteString (&sv.reliable_datagram, key); - MSG_WriteString (&sv.reliable_datagram, val); + ClientReliableWrite_Begin(client, svc_setinfo, 1+1+strlen(key)+1+strlen(val)+1); + ClientReliableWrite_Char(client, i); + ClientReliableWrite_String(client, key); + ClientReliableWrite_String(client, val); } } }