engine: common: don't let executing @ prefixed commands and cvars for unprivileged mode

This commit is contained in:
Alibek Omarov
2026-06-02 06:13:59 +05:00
parent 918323fcea
commit fe1827f5e4
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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 )