3377 Commits

Author SHA1 Message Date
Kawe Mazidjatari
901b4e13ba Bump sig cache version
Signatures changed
2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
c6f2c99619 Improve client-side online authentication error handling and UX
Display the error to the user without having to open the developer console or terminal window. This patch also adds printing to COM_ExplainDisconnection (which has been stripped out of the retail binary).
2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
1dea3575ef Must be compiled for client dll too 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
2fe902061e Don't check for accepted EULA versions if this is a dedicated server 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
ec825962b6 These files are now located in the bin dir 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
be8ee3d0b1 SDK cleaner script is now in the bin dir 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
1687b633f3 Update SDK cleaner script 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
209045e10c Patch is no longer needed
This file has been moved over to the VPK, therefore, formatting will always be identical.
2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
5e53a75571 Drop a warning when someone fails authentication 2024-04-05 16:34:28 +02:00
Kawe Mazidjatari
98a5cdc246 Spawn AI hints so the entire AI Network can be cached 2024-04-05 16:34:27 +02:00
Kawe Mazidjatari
1b5238eab0 Rename VPK build scripts 2024-04-05 16:31:08 +02:00
Kawe Mazidjatari
dbb85e97f0 The dedicated server needs this as well 2024-04-05 16:28:59 +02:00
Kawe Mazidjatari
b37a3bdeba Add comments on newly added code 2024-04-05 16:28:59 +02:00
Kawe Mazidjatari
22c82d6f1d EULA dialog implementation
Display the EULA (fetched from masterserver), which the end user MUST accept before they can make use of the multiplayer features of R5Reloaded. NOTE: user doesn't need to agree to this to use the listenserver.
2024-04-05 16:26:18 +02:00
Kawe Mazidjatari
5d2a331170 CFG cleanup
Remove dev parameters from retail configs, disable net_usesocketsforloopback by default now. This was a leftover from before we got dedicated servers working, and was thus required to get other people to connect to the listen server. This is no longer needed, it was causing a problem with authentication on the local server as the input address from the client would differ from what the master server would bake into the JWT token (localhost translates into an actual ip address on the master server side).
2024-04-05 16:24:47 +02:00
Kawe Mazidjatari
cbf370019d Don't query JWT token if we connect to localhost
Localhost in many cases implies usage of listen server; these don't require auth on loopback connections.
2024-04-05 16:24:47 +02:00
Kawe Mazidjatari
506134fffb Only run ImGui code if we aren't quitting
Should fix a very rare crash where this still gets called while imgui has already been destroyed.
2024-04-05 16:24:47 +02:00
Kawe Mazidjatari
8774baecd7 Bump version to 009 2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
7c06711a0a Update third party legal notices
Added MbedTLS & l8w8jwt.
2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
cd2d47b959 Add configurable server cvars for auth system
The command execute is now guarded off on the client with the cvar 'sv_allowClientSideCfgExec' instead of 'sv_cheats'.
2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
967aa0dfd4 Bump sigcache version to 2.8 and rename methods
Bump version and rename CSigCache::LoadCache to CSigCache::ReacCache.
2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
9c4fb57fa7 R5Reloaded 2.3 emblem 2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
0eaa226dce Change JSON field types send to master server
They were all strings; changed them to what made most sense for each field type. Changes:
"hidden": string -> bool
"port": string -> int
"checksum": string -> uint
"playerCount": string -> int
"maxPlayers": string -> int
2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
02acb45037 Reset to default master server endpoint 2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
dd85e2b6a1 Bugfix: don't print summaries of hidden cvars 2024-04-05 16:24:46 +02:00
Kawe Mazidjatari
909977452e Client token authentication implementation
The game internally obtains a auth token from Origin. On connect to a gameserver, it will send it to the masterserver. The master server will create a JWT token and send this back to the client. The client stores this token in 3 userinfo cvars (token, sig1, sig2). the sig1 and sig2 cvars are there to compensate for the truncation caused by sending the cvar, as each cvar string length could be up to 255 (byte max). The server verifies this token (the signature, timestamp, expiry); if they are valid, the has successfully authenticated and will connect.
2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
f8fe90874a Only compile signature results in dev mode 2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
bfea8023eb Reduce duplicate code
Make a method for setting the host state.
2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
27493a25ae Make const
Const correctness.
2024-04-05 16:24:45 +02:00
Kawe Mazidjatari
5d9b9ec9d5 Fix CVE-2023-38546
Merge: curl/curl@61275672b4
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
6b246e0ce8 Netchan: comment out unused code 2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
b3e768190c Pylon: fix use after free
The member must contain a copy of the string, pointing it to the buffer used by the language cvar results in undefined behavior. Several cases were the string pointed to random data were reported.
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
723052eb6f Improve CPU detection code
Structure now fully aligns with that of the engine, with exception of newly added fields for the SDK (new fields are marked in the structure definition).
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
86ca562fb3 Constness 2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
994658c4a2 Fixup hardcoded thirdparty directories in CMake files
Should be obtained from the 'THIRDPARTY_SOURCE_DIR' variable.
2024-04-05 16:21:45 +02:00
Kawe Mazidjatari
8bd1fa4c6e Fix JWT compile errors and warnings 2024-04-05 16:21:44 +02:00
Kawe Mazidjatari
dc011e5d99 Add MbedTLS library to SDK
Will be used for the JWS library, should eventually be replaced with SChannel.
2024-04-05 16:21:44 +02:00
Kawe Mazidjatari
cc3b91a3b6 WIP: add JWT library
Currently does not compile, pending integration into SDK.
2024-04-05 16:05:56 +02:00
Kawe Mazidjatari
3b81e9e589 Pak load code refactor and improvements
Make pak code more consistent.
* Added 'Pak_CloseFile' to SDK.
* Added partial rebuild of 'Pak_ProcessPakFile' to SDK.
* Added compile time assert for 'PakFileHeader_t' structure.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
22bbb173fa Make ICpuTopology methods virtual
Virtual in the engine we are working on; this should be virtual too.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
aa13725f15 Add table for affinity mask
Small usage table.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
c1c01d2302 Swap SSE4.1 instruction with an SSE2 instruction
The min spec is SSSE3, using SSE4.1 instructions (_mm_extract_epi64) will break compatibility. The code containing the defect is debug only, and %90+ of the user base uses an SSE4.1 capable processor.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
f2058c9ecd Fix typo
Second statement should be checking on vecMaxBound.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
48256955af Null console commands past the 512th byte
A mistake has been made, certain area's of the engine actually do allow strings larger than 128 bytes, just one routine that doesn't (console commands). Tokenizer only tokenizes it up to 512 bytes, so null all the other bytes past this. This still fixes the flaw mentioned in the comment at the place where the nulling happens.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
7b7177240d Improve NavMesh render performance 2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
328fb75674 Should be a word pointer 2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
d6fd782601 Add new RPak types and rename existing
Rename to enforce consistency.
2024-04-05 15:57:33 +02:00
Kawe Mazidjatari
156e31404e Light protobuf cmakelist cleanup
Add missing files and remove unused version file (version file was also incorrect, it mentions version 3.19 but we have 3.21.12).
v2.3_rc4 v2.3_rc0 v2.4_rc4 v2.4_rc3 v2.4_rc2 v2.4_rc1 v2.4_rc0 v2.3_rc9 v2.3_rc8 v2.3_rc7 v2.2_rc11 v2.3_rc6 v2.3_rc2 v2.3_rc3 v2.2_rc12 v2.3_rc1 v2.4_rc5 v2.3_rc5
2023-09-17 22:06:15 +02:00
Kawe Mazidjatari
7b5f40fb9d Upgrade spdlog library to 1.12.0 2023-09-17 20:37:44 +02:00
Kawe Mazidjatari
feffcdfa94 Light pluginsystem cleanup
Light cleanup and improvements. Always load plugin dll's from "GAME" first before searching through mods to prevent mods from overriding them.
2023-09-17 20:33:57 +02:00