engine: forbid accessing cvars starting with con_ and scr_ through stufftext
Some stupid servers might mess up with console cvars values.
This commit is contained in:
parent
51945f002b
commit
4bf72b5383
2 changed files with 2 additions and 2 deletions
|
@ -949,7 +949,7 @@ static void Cmd_Else_f( void )
|
|||
|
||||
static qboolean Cmd_ShouldAllowCommand( cmd_t *cmd, qboolean isPrivileged )
|
||||
{
|
||||
const char *prefixes[] = { "cl_", "gl_", "r_", "m_", "hud_", "joy_" };
|
||||
const char *prefixes[] = { "cl_", "gl_", "r_", "m_", "hud_", "joy_", "con_", "scr_" };
|
||||
int i;
|
||||
|
||||
// always allow local commands
|
||||
|
|
|
@ -955,7 +955,7 @@ static void Cvar_SetGL( const char *name, const char *value )
|
|||
|
||||
static qboolean Cvar_ShouldSetCvar( convar_t *v, qboolean isPrivileged )
|
||||
{
|
||||
const char *prefixes[] = { "cl_", "gl_", "m_", "r_", "hud_", "joy_" };
|
||||
const char *prefixes[] = { "cl_", "gl_", "m_", "r_", "hud_", "joy_", "con_", "scr_" };
|
||||
int i;
|
||||
|
||||
if( isPrivileged )
|
||||
|
|
Loading…
Add table
Reference in a new issue