Commit 614638d
committed
Reliability fixes for nickname valid-checks on client and server
Fix 1: Backtick validation gap (client)
Added strchr(szNick, '') != nullptrcheck to the client's CheckNickProvided, matching the server's version in Shared/Utils.cpp. Previously, a nickname containing a backtick passed all client-side checks, was serialized correctly, and then got rejected server-side with INVALID_NICKNAME.
Fix 2: Unchecked ReadString (server)
Added return-value check on BitStream.ReadString(m_strPlayerVersion). If this read fails (corrupted length prefix from a shifted bitstream), it now returns false immediately instead of continung to parse the nickname and subsequent fields from a wrong offset. This prevents garbage data from being interpreted as the nickname and triggering an incorrect INVALID_NICKNAME.1 parent 8b61ad0 commit 614638d
2 files changed
Lines changed: 4 additions & 1 deletion
File tree
- Client/core
- Server/mods/deathmatch/logic/packets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
453 | 455 | | |
454 | 456 | | |
455 | 457 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments