yesdog / Waterdog

Waterdog, a Yesdog fork of Waterfall/BungeeCord that adds Bedrock support.
MIT License
186 stars 37 forks source link

Incompatibility with PM4 due to extra packet data in LoginPacket #161

Closed 95CivicSi closed 3 years ago

95CivicSi commented 3 years ago

Version of Waterdog

Waterdog-Bootstrap:1.15-SNAPSHOT:9c87c52:6

Expected Behavior

Player connection is passed through to PocketMine-MP 4.0.0 Endpoint

Actual Behavior

PocketMine-MP 4.0.0 Endpoint rejects/kicks the player connection due to a bad Login Packet

Crashdump, Backtrace or Other Files

 [Server thread/ERROR]: [NetworkSession: 172.18.0.3 44315] Bad packet (error ID 00d71b70f17f): Error processing LoginPacket: JSON property "Waterdog_OriginalUUID" does not exist in object of type pocketmine\network\mcpe\protocol\types\login\ClientData

Describe the bug

Waterdog Proxy adds unexpected data to the login packet for MCBE which causes PocketMine-MP 4.0.0 to reject the packet. This information appears to be added here: https://github.com/yesdog/Waterdog/blob/master/BungeeCord-Patches/0059-Waterdog-PE-additions.patch#L2615

To Reproduce

Setup Waterdog with a single endpoint of PocketMine-MP using PocketMine-MP 4.0.0 (master branch). Attempt to connect to the proxy.

Screenshots

Server software used:

PocketMine-MP 4.0.0

Additional context

This happens here: https://github.com/pmmp/PocketMine-MP/blob/master/src/network/mcpe/handler/LoginPacketHandler.php#L210 While I understand that this error is happening because of how PocketMine-MP 4.0.0 handles the LoginPacket, it is not feasible to implement a fix in the server software with a plugin and would require PocketMine-MP to include a Waterdog specific property to their login packet. It would be best if Waterdog could avoid adding additional properties to MCBE packets. This would help ensure better compatibility with various MCBE Server software solutions.

Alemiz112 commented 3 years ago

Hello, Waterdog forwards extra attributes in client data of LoginPacket. This attributes contains original uuid assigned by microjang, original address ... To disable it, if you really do not need any of it you must edit source. Probably best would be to handle this extra attributes by pmmp.

TobiasGrether commented 3 years ago

Fixed by PM4 now skipping unknown properties

supercrafter333 commented 2 years ago

This bug contains!