mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-16 00:28:20 +03:00
Merge pull request #641 from dreamstalker/namedots
Additional check for '..' in fixed names
This commit is contained in:
commit
4da8c9ebcd
@ -2132,11 +2132,7 @@ int SV_CheckUserInfo(netadr_t *adr, char *userinfo, qboolean bIsReconnecting, in
|
|||||||
}
|
}
|
||||||
#endif
|
#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)
|
if (name[0] == '\0' || !Q_stricmp(name, "console") || Q_strstr(name, "..") != NULL)
|
||||||
#endif // REHLDS_FIXES
|
|
||||||
{
|
{
|
||||||
Info_SetValueForKey(userinfo, "name", "unnamed", MAX_INFO_STRING);
|
Info_SetValueForKey(userinfo, "name", "unnamed", MAX_INFO_STRING);
|
||||||
}
|
}
|
||||||
@ -4909,7 +4905,11 @@ void SV_ExtractFromUserinfo(client_t *cl)
|
|||||||
Q_UnicodeRepair(newname);
|
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"))
|
if (newname[0] == '\0' || !Q_stricmp(newname, "console"))
|
||||||
|
#endif // REHLDS_FIXES
|
||||||
{
|
{
|
||||||
Info_SetValueForKey(userinfo, "name", "unnamed", MAX_INFO_STRING);
|
Info_SetValueForKey(userinfo, "name", "unnamed", MAX_INFO_STRING);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user