Luohuayu / CatServer

高性能和高兼容性的1.12.2/1.16.5/1.18.2版本Forge+Bukkit+Spigot服务端 (A high performance and high compatibility 1.12.2/1.16.5/1.18.2 version Forge+Bukkit+Spigot server)
https://catmc.org
GNU Lesser General Public License v3.0
1.98k stars 211 forks source link

Skins dont work. #375

Closed Zilacon closed 2 years ago

Zilacon commented 2 years ago

Hello, i switched from Mohist to CatServer due to them refusing to fix the mountain of problems with it. But mohist didnt have an issue with skins, while CatServer seems to be a lot more stable, no one can see anyones skins.

Could this be fixed? This is an issue on 8 different servers/modpacks. And switching to Mohist shows player skins, so its just an issue with CatServer.

Thanks.

Luohuayu commented 2 years ago

Are you using online mode or a skin plugn?

Zilacon commented 2 years ago

Are you using online mode or a skin plugn?

The servers are in offline mode, so they can be used with bungeecord, which is in online mode. I am not using any skin plugins.

Luohuayu commented 2 years ago

Which version of BungeeCord are you using?

Zilacon commented 2 years ago

Which version of BungeeCord are you using?

Its custom, but we keep up with the official bungeecord, waterfall, and flamecord with patches.

Luohuayu commented 2 years ago

I can’t reproduce it on normal BungeeCord

Fox2Code commented 2 years ago

Hi, I'm the maintainer and main developer of the custom BungeeCord that APOC use, the custom Bungee use a system to fix invalid packets in real time to fix issues such as skin not working or client crashes.

Somehow CatServer is sending unsigned skin data, causing skin to be invalid client side.

Due to clients using their own skin data from their local profile as fallback this make the issue impossible to detect without being at least 2 players on the same server, and trying to check the other player skin.

The packet fixer was able to fix skin data being invalid only with theses changes:

-                        if (item.getProperties() == null || item.getProperties().length == 0) {
+                        if (item.getProperties() == null || item.getProperties().length == 0 ||
+                                item.getProperties()[0].length < 3 || connection.isForceSkinRewrite()) {

Note: isForceSkinRewrite return false, so the most important part in the fix is item.getProperties()[0].length < 3

A normal property is supposed to be new String[]{"key", "value", "signature"}, but somehow CatServer isn't sending the signature, triggering the fix of the packet and resolving the skin issue on our BungeeCord, but an unmodified BungeeCord don't have such mechanism to fix invalid tab packet send to them. (Skin is managed by the tab list in 1.12.2)

While we have fixed the issue on the BungeeCord side, I asked @Zilacon to leave this issue open to help CatServer fix the skin issue on all modded servers, and not only the one using our specific packet fixer.

Luohuayu commented 2 years ago

@Fox2Code Skin data is signed 1

Fox2Code commented 2 years ago

Well, probably due to an edge case the data is not signed, the workaround on Gateway (name of the custom BungeeCord) work well enough for now.