(#3767) Some protection from malicious qvms - patches and ideas by Amanieu d'Antras and Ben Millwood

This commit is contained in:
Thilo Schulz 2011-03-08 01:39:34 +00:00
parent 657c791257
commit 8c3f320504
12 changed files with 155 additions and 26 deletions

View file

@ -416,13 +416,13 @@ void CL_SystemInfoChanged( void ) {
else
{
// If this cvar may not be modified by a server discard the value.
if(!(cvar_flags & (CVAR_SYSTEMINFO | CVAR_SERVER_CREATED)))
if(!(cvar_flags & (CVAR_SYSTEMINFO | CVAR_SERVER_CREATED | CVAR_USER_CREATED)))
{
Com_Printf(S_COLOR_YELLOW "WARNING: server is not allowed to set %s=%s\n", key, value);
continue;
}
Cvar_Set(key, value);
Cvar_SetSafe(key, value);
}
}
// if game folder should not be set and it is set at the client side