From 982f358bf37b69ac1d99887887d71fe86226a2fb Mon Sep 17 00:00:00 2001 From: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com> Date: Sat, 10 Jul 2021 19:28:39 +0800 Subject: [PATCH] ResourcePackSend: Add URL checking for invalid resource pack --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 627ad897..3fec7721 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -860,7 +860,7 @@ namespace MinecraftClient.Protocol.Handlers String forcedMessage = ChatParser.ParseText(dataTypes.ReadNextString(packetData)); } // Some server plugins may send invalid resource packs to probe the client and we need to ignore them (issue #1056) - if (hash.Length != 40) + if (!url.StartsWith("http") && hash.Length != 40) // Some server may have null hash value break; //Send back "accepted" and "successfully loaded" responses for plugins or server config making use of resource pack mandatory byte[] responseHeader = new byte[0];