1
1
forked from 0ad/0ad
0ad/source
wraitii 113fefeeb7 Netcode: Identify controller client via a secret key
The 'controller' of an MP game (the host in general, though dedicated
servers would change that) is currently whoever first tells the server
that it is. This can be abused since it relies on trusting the clients.

This changes that logic: the server defines a 'controller secret', and
the first client to sent the correct controller secret is the
controller. This is safe assuming the secret is unknowable enough (the
current solution wouldn't pass strict cryptography tests, but it's
likely good enough).

Reverts 1a3fb29ff3, which introduced the 'trust the clients' mechanic,
as a change over 'the first local IP is controller'.

Necessary step towards dedicated server, if we want to use the regular
gamesetup (Refs #3556)

Differential Revision: https://code.wildfiregames.com/D3075
This was SVN commit r24952.
2021-02-27 17:44:59 +00:00
..
collada Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
graphics Early return in PreprocessorWrapper in case of failed include resolve. 2021-02-27 17:21:02 +00:00
gui Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
i18n Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
lib Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
lobby Get the public IP from the lobby if not using STUN. 2021-02-08 15:47:34 +00:00
maths Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Netcode: Identify controller client via a secret key 2021-02-27 17:44:59 +00:00
pch Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ps Netcode: Identify controller client via a secret key 2021-02-27 17:44:59 +00:00
renderer Fix water wind speed computation 2021-02-27 10:08:00 +00:00
rlinterface Only parse querystring in RL Interface if it exists. 2021-02-06 23:00:45 +00:00
scriptinterface Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
simulation2 Fix compilation following 52fcee9c91 2021-02-27 11:12:21 +00:00
soundmanager Refactors smart pointers creation, reduces code duplication and improves exception safety. 2021-02-13 23:53:40 +00:00
third_party Optimization for include resolving in PreprocessorWrapper. 2021-01-20 23:05:15 +00:00
tools Fix *nix tarballs to extract in a subfolder. 2021-02-27 10:19:31 +00:00
main.cpp Fixes big screenshots with water (reflection or refraction camera), adds big screenshot customization. 2021-02-12 21:20:07 +00:00
test_setup.cpp Fix windows SEH hook when crashing in an std::thread 2021-01-10 08:39:54 +00:00