TownyAdvanced / TownyFlight

Flight plugin for Towny servers.
https://townyadvanced.github.io/
Other
23 stars 17 forks source link

Exploit - TFly is not removed on teleporting (e.g. warping) #55

Closed ProfessionalBoatDrifter closed 2 years ago

ProfessionalBoatDrifter commented 2 years ago

What is the issue that you see?

Players can enable /tfly in a town and then use a warp to teleport elsewhere. This does not remove flight from the player and lets them fly anywhere in the world until you return to a town where the X seconds warning appears.

What steps can be done to repeat the issue on a test server?

  1. Go into a player town where you can use /tfly
  2. Go to a /warp
  3. Go anywhere in the world other than into your town and continue flying

What is supposed to happen instead?

  1. Go into a player town where you can use /tfly
  2. Teleport elsewhere (any teleport, e.g. players using /tp or /warp)
  3. Lose /tfly if somewhere you don't have permission to use /tfly

Versions/Files

Towny Version (use '/towny v' in game) : Towny version: 0.97.0.0 TownyFlight Version : TownyFlight-1.6.6 Link to pastebin.com with full server startup from the latest.log : Link to pastebin.com with TownyFlight config.yml : https://pastebin.com/mRJcNC3X

LlmDl commented 2 years ago

Update your towny flight and towny and re-test.

ProfessionalBoatDrifter commented 2 years ago

Sorry about that, it seems that the updates does indeed fix this issue. Thanks for the quick reply!

ProfessionalBoatDrifter commented 2 years ago

I was about to reopen this issue but I resolved it with the help of one of our members.

The bug happens when a player uses /tfly where available (such as in your home town). Then the player warps to an area protected by World Guard running extension flags. The extension flag "fly" was set to Deny. When I unset the flag, to neither Allow nor Deny, TownyFlight worked as expected.

I'm not sure which plugin adds the flag but it's either WorldGuardExtraFlags or WorldGuard-Towny-1.1.0. I believe it's the first.

If anyone else has this issue with updated plugins maybe our fix helps you.

LlmDl commented 2 years ago

It's not WorldGuard-Towny.

ProfessionalBoatDrifter commented 2 years ago

It's not WorldGuard-Towny.

Then it's WorldGuardExtraFlags.