mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: common: don't let executing @ prefixed commands and cvars for unprivileged mode
This commit is contained in:
@@ -834,7 +834,7 @@ static qboolean Cmd_ShouldAllowCommand( cmd_t *cmd, qboolean isPrivileged )
|
||||
return true;
|
||||
|
||||
// never allow local only commands from remote
|
||||
if( FBitSet( cmd->flags, CMD_PRIVILEGED ))
|
||||
if( FBitSet( cmd->flags, CMD_PRIVILEGED ) || cmd->name[0] == '@' )
|
||||
return false;
|
||||
|
||||
// allow engine commands if user don't mind
|
||||
|
||||
@@ -943,7 +943,7 @@ static qboolean Cvar_ShouldSetCvar( convar_t *v, qboolean isPrivileged )
|
||||
if( isPrivileged )
|
||||
return true;
|
||||
|
||||
if( FBitSet( v->flags, FCVAR_PRIVILEGED ))
|
||||
if( FBitSet( v->flags, FCVAR_PRIVILEGED ) || v->name[0] == '@' )
|
||||
return false;
|
||||
|
||||
if( cl_filterstuffcmd.value <= 0.0f )
|
||||
|
||||
Reference in New Issue
Block a user