Commit graph

6216 commits

Author SHA1 Message Date
Arthri
2053213558 Bounce infinite or NaN velocity / position 2025-02-08 07:13:03 +00:00
ohayo
6d5fff83cf Prevent blank UUIDs from being banned
This fixes a bug with a bad actor getting banned with a blank client UUID and then preventing anyone from joining the server due to a lack of UUID on the Connect Request ban check.
2025-02-08 14:37:48 +10:00
ohayo
de142e419e I guess update the magic number here too? 2025-02-05 09:37:53 +10:00
ohayo
5a23073db5 Suggestions + fix last missed magic number 2025-02-05 09:33:36 +10:00
ohayo
72f529fcb1 Typo fix 2025-02-04 21:24:44 +10:00
ohayo
ce04d9d173 Remove magic number + Use suggestions by particles
Added a new ClientState enum based on code in Terraria.MessageBuffer.GetData & Terraria.Netplay.InnerClientLoop
2025-02-04 21:06:40 +10:00
ohayo
ff9cb9f858 Change the cast PacketTypes for 74 to its corresponding definition 2025-02-04 12:13:47 +10:00
ohayo
fa3c144274 Add necessary packets to a static hashset for further performance boosts
title
2025-02-04 11:28:09 +10:00
ohayo
52d1840003 Packet filtering for those who never finish the handshake
This also kicks those who never finish handshaking upon chat now. (To free up the resources a bit I guess?)

Before a player finishes the connection handshake, the server will check if it's necessary to send them a packet - it checks against a list of necessary packets like:

- ContinueConnecting (Send User Slot),
- PlayerSpawnSelf (CompleteConnectionAndSpawn),
- WorldInfo (Which the server does a further check if the player is at the appropriate state to be sent the world info)
- Status
- Disconnection
- TileFrameSection & TileSendSection
2025-02-04 11:07:10 +10:00
ohayo
b5d546a660 Remove debug logging (sorry haha) 2025-02-02 12:41:35 +10:00
ohayo
4f2fff050d Quick bug fix - forgot about respawns + only set handshake once
The connection state should NEVER be set to under 3 if the player is fully connected.
2025-02-02 12:40:04 +10:00
ohayo
4c01740177 Fix handshake stuff part 2
If the player has requested world data before sending the spawn player packet, they should be at state 3, otherwise they should be at state 1 for skipping it. Just check based on that instead.
2025-02-02 12:08:14 +10:00
Lucas Nicodemus
e4e28cb1b5
Version tick: 5.2.2 2025-02-01 22:32:36 +09:00
Lucas Nicodemus
134f80f5b8
Merge commit from fork
Missing ban validation in Connect Request allows TShock ban bypassing
2025-02-01 22:28:55 +09:00
ohayo
ed398430bc Update changelog.md 2025-01-31 10:04:50 +10:00
ohayo
53789b40e4 Prevent further things from clients who dont handshake
- The player will only finish the handshake once they spawn their player, a normal client would always do this eventually.

- They cannot chat, even if they request world data but just not spawn their player.

- Other clients will not be notified of their join/leave in both cases (dont request WD or do but dont spawn)

- And most importantly, they do not show on the in game player list but still show on the server console /playing cmd.
2025-01-31 09:17:26 +10:00
ohayo
d35934b3a2 Check for bans on connection as well as join, etc
Should prevent people from being able to bypass this.
2025-01-30 22:46:13 +10:00
Lucas Nicodemus
80c29ee081
Merge pull request #2882 from drunderscore/feature/detect-installations-in-client-directory
Detect invalid TShock installations
2025-01-27 22:01:27 +09:00
Lucas Nicodemus
0516428f88
Merge branch 'general-devel' into feature/detect-installations-in-client-directory 2025-01-27 21:56:48 +09:00
Lucas Nicodemus
49b1003eca
Update github actions upload artifact to v4
This is part of #3050, but thinking about this logically, the deprecation of v3 happens in just 3 days, so unless we want to have .NET 9 testing done in the next 3 days (unlikely?), it's not a great idea to let this break.
2025-01-27 21:07:36 +09:00
Lucas Nicodemus
5e4f17b47a
Merge pull request #2960 from AgaSpace/commandhooks
New two hooks PrePlayerCommand and PostPlayerCommand
2025-01-27 10:09:36 +09:00
Lucas Nicodemus
97d88b3b3c
Merge branch 'general-devel' into commandhooks 2025-01-27 10:06:01 +09:00
Lucas Nicodemus
7058a9d61f
Merge pull request #2951 from AgaSpace/group-changes
Group changes
2025-01-27 09:16:28 +09:00
Lucas Nicodemus
fe3644ca80
Merge branch 'general-devel' into group-changes 2025-01-27 09:13:01 +09:00
Lucas Nicodemus
64a4c9c1cd
Merge pull request #2952 from drunderscore/fix/player-data-is-sometimes-not-there
Ensure `TSPlayer.PlayerData` is non-null whilst syncing loadouts
2025-01-27 09:00:47 +09:00
Lucas Nicodemus
3115e1f032
Merge branch 'general-devel' into fix/player-data-is-sometimes-not-there 2025-01-27 08:57:36 +09:00
Lucas Nicodemus
de8a0a634c
Merge pull request #3057 from sgkoishi/pr3057
Detect xterm compatibility to avoid console spam
2025-01-27 08:55:01 +09:00
SGKoishi
605be8f813
Detect xterm compatibility to avoid console spam 2025-01-27 08:11:36 +09:00
Lucas Nicodemus
f71f3b865c
Merge pull request #3056 from sgkoishi/pr3056
Automatic language detection
2025-01-26 16:16:58 +09:00
SGKoishi
c4a141308e
Automatic language detection 2025-01-26 15:11:15 +09:00
Lucas Nicodemus
c6dfb97349
Merge pull request #3055 from sgkoishi/pr3055
Fix #2895
2025-01-26 13:43:50 +09:00
Lucas Nicodemus
5da5f35c15
Merge branch 'general-devel' into pr3055 2025-01-26 13:42:01 +09:00
Lucas Nicodemus
74a07150f8
Update submodule 2025-01-26 13:37:38 +09:00
Lucas Nicodemus
faf7854a23
Merge pull request #2947 from AgaSpace/accountgroupcupdate-hook
Added AccountGroupUpdate hook, when trying to change a user group.
2025-01-26 13:03:46 +09:00
SGKoishi
52ed275be2
Fix #2895 2025-01-26 13:00:06 +09:00
Lucas Nicodemus
4cab985d0f
Merge branch 'general-devel' into accountgroupcupdate-hook 2025-01-26 12:59:15 +09:00
Lucas Nicodemus
846ccb46bd
Merge pull request #3015 from Metratrj/fix/offnosave
fix: off no save command
2025-01-26 09:52:43 +09:00
Lucas Nicodemus
9d96c02e2e
Merge branch 'general-devel' into fix/offnosave 2025-01-26 09:47:26 +09:00
Lucas Nicodemus
92c3f0086d
Merge pull request #3039 from ACaiCat/general-devel
fix: /help, /me, and /p commands can't work in non-English languages
2025-01-26 09:44:08 +09:00
Lucas Nicodemus
519f94116c
Merge branch 'general-devel' into general-devel 2025-01-26 09:38:37 +09:00
Lucas Nicodemus
e1c41d0ac9
Merge pull request #2945 from AgaSpace/netitem-changes
NetItem changes
2025-01-26 09:06:26 +09:00
Lucas Nicodemus
18062c55e7
Merge branch 'general-devel' into netitem-changes 2025-01-26 09:02:51 +09:00
Lucas Nicodemus
fdee582dc7
Redirect ikebukuro to wiki
This redirects the hosted docs on github pages to the wiki, which is easier for normal people to edit.
2025-01-26 09:00:41 +09:00
Lucas Nicodemus
b984ff8b65
Apply patch from https://github.com/Pryaxis/TShock/pull/3018
This applies https://github.com/Pryaxis/TShock/pull/3018 as a patch per @punchready because they deleted the head repository so that we can't merge it and none of the git objects have valid refs anymore on the command line and we can't merge it on the gui.
2025-01-26 08:45:11 +09:00
Lucas Nicodemus
2952762032
Merge pull request #3005 from sgkoishi/pr3005
Whitelist the Striking Moment (`ParryDamageBuff`) buff
2025-01-26 01:26:45 +09:00
SGKoishi
65559d5db8
Merge remote-tracking branch 'upstream/general-devel' into pr3005 2025-01-26 01:22:34 +09:00
Lucas Nicodemus
c9678fac26
Merge pull request #2925 from sgkoishi/patch-1
Remove Connection: Close for REST api
2025-01-26 01:08:50 +09:00
SGKoishi
6ee22758c1
Merge remote-tracking branch 'upstream/general-devel' into patch-1 2025-01-25 08:05:35 -08:00
SGKoishi
61a81bb4ff
Fix merge conflict 2025-01-26 01:00:17 +09:00
Lucas Nicodemus
251353c566
Merge pull request #2939 from sgkoishi/consistency-playeractive-patch
Use same TSPlayer.Active check
2025-01-25 23:15:31 +09:00