Skip to content

Commit

Permalink
fix(resources/client): ignore GET_CONVAR gets for update channel
Browse files Browse the repository at this point in the history
People tend to use the update channel as a marker for some other (less
related) state, usually with counterproductive effects.

Requested in https://forum.cfx.re/t/5025093.
  • Loading branch information
blattersturm committed Mar 11, 2023
1 parent b32f297 commit 555579d
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -12,7 +12,8 @@ static InitFunction initFunction([]()

// this should not be exposed to script
// #TODO: 'not exposed to script' convar flags
if (HashString(varName.c_str()) == HashString("cl_ownershipTicket"))
if (HashString(varName.c_str()) == HashString("cl_ownershipTicket") || // ownership ticket is *very* bad to expose as users can pretend to be other users using this
HashString(varName.c_str()) == HashString("ui_updateChannel")) // update channel is often misused as a marker for other things
{
context.SetResult(context.CheckArgument<const char*>(1));
return;
Expand Down

0 comments on commit 555579d

Please sign in to comment.