Commit graph

80 commits

Author SHA1 Message Date
punchready
3302b4653e Update STR checks to be even more strict 2023-04-04 05:51:53 +02:00
punchready
b714ab18a5 Completely rewrite STR handling 2023-04-04 05:08:17 +02:00
Chris
ec72f4957b
Merge branch 'general-devel' into patch-2 2023-03-25 16:45:45 +10:30
punchready
5acc3afcb6 Update STR handling to reject for-sure invalid framing values 2023-03-24 21:39:24 +01:00
punchready
9a0269fb83
Update definitions for Flower Boots to allow Ash Plants 2023-02-28 22:05:25 +01:00
SGKoishi
656a6a49be
Exclude unused fields, allow tileMoss, SandSpray and SnowSpray 2022-12-10 13:36:13 -08:00
SGKoishi
d2037a62e5
Allow more tile and wall conversion 2022-11-27 21:14:13 -08:00
Lucas Nicodemus
a9aa988547
Merge remote-tracking branch 'sgk/patch-morei18n' into general-devel 2022-11-09 23:08:34 -08:00
SGKoishi
863d51ad27
Add missing string 2022-11-04 20:46:53 -07:00
SGKoishi
01e289e6ac
Fix #2800 2022-11-04 20:01:24 -07:00
Janet Blackquill
f63b26ac76 Some i18nifiying 2022-10-21 16:12:04 -04:00
punchready
25500bcccc
Use ad hoc checks for world boundary instead 2022-10-19 05:26:07 +02:00
punchready
4e542d6ef6
Skip tile rect changes close to the world edge 2022-10-19 05:20:18 +02:00
punchready
e53b723bd8
Fix grass mowing keeping hanging vines intact
Creating a long row of grass with vines below and then mowing it without breaking the vines below could cause a tile framing stack overflow due to all vines being cleared at once if one of them is being broken on the server or if the client simply loads the corresponding section.
Warning: this does not fix eventual existing worlds that are already in such a state.
2022-10-19 04:43:27 +02:00
Luke
a7cd6b6c9c Update ITile with new NetTile data 2022-10-12 16:51:31 +10:00
Luke
aa0bd7deb2 Merge branch 'general-devel' into otapi3 2022-09-06 22:23:34 +10:00
punchready
9358f11e51 Improve comments 2022-08-14 01:22:22 +02:00
punchready
cf9240d56d Support grass mowing 2022-07-27 11:35:21 +02:00
punchready
8b4dc3a1a4 Fix flower boots check, clean up code 2022-07-27 06:23:34 +02:00
punchready
681c6de1f7 add strict STR size checking 2022-07-26 08:24:46 +02:00
punchready
abaf414523 Remove tiles which are no longer sent in this packet 2022-07-26 00:01:25 +02:00
punchready
3383c630e3 Strictly filter tile types in send tile rect handling 2022-07-25 11:29:25 +02:00
Luke
8edd0393e5 Initial OTAPI3 port
TODO: sqlite
2021-11-23 20:49:41 +10:00
Killia0
9b249d72a8
Merge branch 'general-devel' into upstream-general-devel 2021-07-24 19:48:54 -04:00
Killia0
154bee58f1 Typo fixes on comments/strings
My first PR contribution to TShock is spellcheck huh, frankly I don't know why but hey I could spare the time for this and caught some stuff.
2021-07-16 14:53:37 -04:00
Stealownz
a26ad7dce0 Fix SendTileRectHandler not sending tile rect updates to everyone else
Fixes #2386
2021-07-04 17:20:57 +08:00
James Puleo
98c1587e44
Print proper expected player ID when handling
spoofed LandGolfBallInCup.

(edited manually on GitHub, should be okay though)
2021-06-14 03:00:35 -04:00
Lucas Nicodemus
046d52ad2e Move emoji player index check into IllegalPerSe
This is the first commit in a pattern that I'd like to follow. The
concept is that we specifically create handlers for things that are
"illegal per se." That is, there are no possible situations (in the
current protocol) where a packet of this type is received from a client.
In this case, I moved the emoji handler out of the Handler just for
emoji, since it seemed like an obvious case.

The rule of thumb is simple: if something is illegal per se, there
should be no possible way in the vanilla client to achieve this result.
If a player sends this combination of packets they *must* be hacking.
Not that there is a 99.9% chance they're hacking, but that there is a
100% unambiguous chance that they're hacking.

Something is illegal per se if it can only be created by a hacked
client. If there's a crashing bug that a normal player can do with a
complex series of vanilla events, that is not illegal per se.

The goal of this namespace and class of handlers is to handle exactly
one type of protocol violation, and remove the packet accordingly. If it
is ever reported that the packet can be sent from a vanilla client, the
check must be removed as it is no longer a per se violation of the
protocol.
2021-05-27 23:59:43 -07:00
quake1337
b1820c1516 Fix spaces lol 2021-05-21 13:54:40 +02:00
quake1337
817dfe26fc Address feedback from @hakusaro about style & documentation 2021-05-21 13:13:06 +02:00
quake1337
658c714ac5 Remove old UpdateServerTileState call, as the new one supersedes it 2021-05-21 12:13:06 +02:00
quake1337
c6dad11a1c Initial patch for advisory-1.
- Remove unused fields from NetTile
- Apply data from packets selectively based on approving context.
2021-05-21 09:53:33 +02:00
Chris
9423febd0a Refactor for new configuration 2020-12-03 17:43:10 +10:30
Chris
fe5a7ec2e4 Disable STR debugging 2020-11-15 11:06:12 +10:30
Chris
db10bf22e7 Refectoring continued - rename STS Handler to STR Handler 2020-11-13 18:50:54 +10:30
Chris
ca38d64632 The great refactoring! Squares to Rectangles 2020-11-13 17:46:00 +10:30
Patrikkk
530bc95123 RequestTileEntityInteractionHandler - Use object size for building perm check.
This commit will modify the RequestTileEntityInteractionHandler to use HasBuildPermissionForTileObject when checking for building permissions for Hat Rack and Display Doll to give an accurate response wether or not any part of the object has an overlapping protected region.
2020-06-27 10:22:03 +02:00
Patrikkk
d4e4692d8b Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 13:41:14 +02:00
Patrikkk
89ab7be0f8 TileEntityInteraction - Pass TileEntity object instead of ID in args. 2020-06-25 01:51:30 +02:00
Patrikkk
64e61b8ed9 Add DisplayDollItemSyncHandler
In a previous PR I have added the tile entity request packet handler which checks for building permissions to prevent the unauthorized player to open a DisplayDoll and see its content.

This Handler is being added to prevent *Hackers* from modifying a DisplayDoll through direct/crafted packet sending, or by sending raw byte data to the server.
In a valid enviroment, the player couldn't even get to see the content of the doll in the first place, to then try to modify it's items.

Because of this,  I do not bother with making sure the player gets their item back.
2020-06-19 14:21:45 +02:00
Patrikkk
972483340a
Merge branch 'general-devel' into addtileentityinteraction 2020-06-18 23:57:40 +02:00
Rustly
0a01ae6d83
Merge branch 'general-devel' into general-devel 2020-06-18 16:53:14 -05:00
Patrikkk
bb20626203 Add building permission checks for Hat Rack modification.
Keeping this code format to have the code be friendly with us in future updates, as well as display proper rejection message to the players.
2020-06-18 17:32:08 +02:00
Patrikkk
c418dda42c Add RequestTileEntityInteractionHandler. Check Mannequin modif perms.
Users can no longer open a Mannequin if they do not have building permissions at the position of the Mannequin.
(Mannequins work as a chest since 1.4)
2020-06-18 17:08:14 +02:00
Rustly
01bae0475d apply the rest of fixes for snake flute, prevent players from seeing the npc perm error on join 2020-06-15 13:32:42 -05:00
stacey
4949410cfa
minor grammar update 2020-06-13 13:26:34 -04:00
Chris
b633f60567 Resolve STS issue #1999 2020-06-10 13:27:33 +09:30
Patrikkk
5decc50bd9 Bouncer OnNewProjectile - Add checks on directional projectiles.
**This commit does not have any effect on actual gameplay as of current project state, but it does let valid projectile creation pass through instead of getting caught up in Bouncer. That catch is currently disabled for the time being, until all valid projectile creation check is added.**

Things would have get caught up in our bouncer eversince 1.4. We commented out the catch (the disable and handling) for now, but none of these new projectiles were added to let them pass.
Renaming stabProjectile to directionalProjectile. Adding staffs to directionalProjectiles
Adding check for GolfClubHelper projectile.

Left in a debug check for golfball projectile. I would want to see if the reject gets triggered in a proper server enviroment. I didn't want to handle the projectile just yet.
Adding GolfBallItemIDs list in Handlers.LandGolfBallInCupHandler.cs
2020-06-09 14:04:27 +02:00
Chris
c99deae9cc Add some sanity checking around tile object sizes 2020-06-05 12:16:24 +09:30
Chris
fe4679ba95 Remove invalid dictionary entries in CreativePowerHandler 2020-06-04 19:40:41 +09:30