NorthstarLauncher icon indicating copy to clipboard operation
NorthstarLauncher copied to clipboard

Restricting client commands breaks vanilla compatibility.

Open GeckoEidechse opened this issue 2 years ago • 5 comments

Unlike vanilla, gameservers in Northstar are considered "untrusted". As such we have to vet commands sent to client by server.

When fixed our previously broken client command restriction with https://github.com/R2Northstar/NorthstarLauncher/pull/210 we also broke vanilla compatibility again.

In particular it breaks matchmaking as (it seems that) when finding a match the server sends a client command to client that causes it to connect to that game server.

Adding -norestrictservercommands should allow matchmaking in vanilla at the cost of reduced security due to allowing server to run commands on client.

If you're using Northstar to play on vanilla and Northstar servers, it's recommended to deleting -norestrictservercommands when playing on Northstar servers.

GeckoEidechse avatar Jun 27 '22 23:06 GeckoEidechse

It appears this could be due to the "migrateme" command being blocked, which I've fixed in my PR. #189

rolelessweapon avatar Jun 29 '22 00:06 rolelessweapon

I'm not sure if we do want to allow it though. Cause it could allow an attacker to move you onto a different server. That being said, if an attacker is able to execute that command they likely already have some way of getting ClientCommands to run on your client.

GeckoEidechse avatar Jun 29 '22 18:06 GeckoEidechse

Couldn't they just run connect?

rolelessweapon avatar Jun 29 '22 21:06 rolelessweapon

Couldn't they just run connect?

Nope, we block that.

GeckoEidechse avatar Jun 29 '22 22:06 GeckoEidechse

Actually, it appears migrateme is forwarded from the client to the server. So for some reason, the server (or maybe some internal code in the client that passes the wrong argume to CBuf_AddText) generates the migrateme command, executes it on the client, which then gets forwarded back to the server. Migrateme looks completely harmless.

rolelessweapon avatar Jun 30 '22 01:06 rolelessweapon