portal2 icon indicating copy to clipboard operation
portal2 copied to clipboard

Executing commands without the `FCVAR_SERVER_CAN_EXECUTE` flag in multiplayer through `point_clientcommand` or `point_broadcastclientcommand` entities are prevented from being ran by the game.

Open NathanL1370 opened this issue 1 year ago • 3 comments

This wasn't an issue before, but it seemingly now is.

Recent updates for Portal 2 caused commands without the server_can_execute flag (such as upgrade_potatogun) executed by point_clientcommand or point_broadcastclientcommand entities return FCVAR_SERVER_CAN_EXECUTE prevented server running command: upgrade_potatogun in the console. The command only goes through if said command is ran through a point_servercommand entity or ran manually by the client's console.

  1. Open Portal 2 and launch any coop map in splitscreen (ss_map mp_coop_lobby_3)
  2. Create a point_clientcommand or point_broadcastclientcommand entity by running ent_create point_clientcommand or ent_create point_broadcastclientcommand in the console. Make sure you have typed sv_cheats 1 before doing this
  3. Attempt to run a command without server_can_execute flag through the clientcommand/broadcastclientcommand entity by running ent_fire point_clientcommand command "<command without server_can_execute flag>" or ent_fire point_broadcastclientcommand command "<command without server_can_execute flag>" in the console (for example, upgrade_potatogun). The console should now return the FCVAR_SERVER_CAN_EXECUTE prevented server running command: <command without server_can_execute flag>. The example command is upgrade_potatogun, which does not have the server_can_execute flag, should return FCVAR_SERVER_CAN_EXECUTE prevented server running command: upgrade_potatogun.

I don't know if this change was meant to combat RCE exploits and crashes, or if it's a bug with the game. I have tested this on Windows and Steam Deck, both platforms have this issue. Linux and Mac may also be affected.

Image showing the problem: 20240604143220_1

NathanL1370 avatar Jun 04 '24 22:06 NathanL1370