From c7616fa283cce9c76e85544366c5d9491461d40a Mon Sep 17 00:00:00 2001 From: Asmodai Date: Sun, 5 Aug 2018 12:01:59 +0300 Subject: [PATCH] Additional check for '..' in fixed names --- rehlds/engine/sv_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 8bec12a..663a330 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -2132,11 +2132,7 @@ int SV_CheckUserInfo(netadr_t *adr, char *userinfo, qboolean bIsReconnecting, in } #endif -#ifdef REHLDS_FIXES - if (name[0] == '\0' || !Q_stricmp(name, "console")) -#else // REHLDS_FIXES if (name[0] == '\0' || !Q_stricmp(name, "console") || Q_strstr(name, "..") != NULL) -#endif // REHLDS_FIXES { Info_SetValueForKey(userinfo, "name", "unnamed", MAX_INFO_STRING); } @@ -4909,7 +4905,11 @@ void SV_ExtractFromUserinfo(client_t *cl) Q_UnicodeRepair(newname); } +#ifdef REHLDS_FIXES + if (newname[0] == '\0' || !Q_stricmp(newname, "console") || Q_strstr(newname, "..") != NULL) +#else if (newname[0] == '\0' || !Q_stricmp(newname, "console")) +#endif // REHLDS_FIXES { Info_SetValueForKey(userinfo, "name", "unnamed", MAX_INFO_STRING); }