Skip to content

Commit

Permalink
Merge pull request #641 from dreamstalker/namedots
Browse files Browse the repository at this point in the history
Additional check for '..' in fixed names
  • Loading branch information
theAsmodai committed Aug 6, 2018
2 parents 65c6ce5 + c7616fa commit 4da8c9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rehlds/engine/sv_main.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 4da8c9e

Please sign in to comment.