From b665061308cb92a0d68243f502d19475680fda40 Mon Sep 17 00:00:00 2001 From: Li Date: Sun, 20 Nov 2022 12:49:07 +1300 Subject: [PATCH] Dont process XML policy request as a hi1 packet. --- HorseIsleServer/LibHISP/Server/Network/XmlSocket.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HorseIsleServer/LibHISP/Server/Network/XmlSocket.cs b/HorseIsleServer/LibHISP/Server/Network/XmlSocket.cs index fa02903..bb44959 100644 --- a/HorseIsleServer/LibHISP/Server/Network/XmlSocket.cs +++ b/HorseIsleServer/LibHISP/Server/Network/XmlSocket.cs @@ -20,10 +20,13 @@ namespace HISP.Server.Network if (buffer[i] == XMLSOCKET_PACKET_TERMINATOR) // Read until \0... { byte[] packet = currentPacket.ToArray(); + if (Helper.ByteArrayStartsWith(packet, XMLSOCKET_POLICY_FILE)) this.Send(CrossDomainPolicy.GetPolicyFile()); + else + onReceiveCallback(packet); + - onReceiveCallback(packet); currentPacket.Clear(); continue; }