mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-12 13:57:44 +00:00
Stop WindSeedClientNotify and PlayerLuaShellNotify from being sent (#582)
This commit is contained in:
parent
0102a3ce1e
commit
da99140d20
@ -1,5 +1,8 @@
|
|||||||
package emu.grasscutter.net.packet;
|
package emu.grasscutter.net.packet;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class PacketOpcodes {
|
public class PacketOpcodes {
|
||||||
// Empty
|
// Empty
|
||||||
public static final int NONE = 0;
|
public static final int NONE = 0;
|
||||||
@ -1566,4 +1569,6 @@ public class PacketOpcodes {
|
|||||||
public static final int UNKNOWN_43 = 8877;
|
public static final int UNKNOWN_43 = 8877;
|
||||||
public static final int UNKNOWN_44 = 8983;
|
public static final int UNKNOWN_44 = 8983;
|
||||||
public static final int UNKNOWN_45 = 943;
|
public static final int UNKNOWN_45 = 943;
|
||||||
|
|
||||||
|
public static final List<Integer> BANNED_PACKETS = Arrays.asList(PacketOpcodes.WindSeedClientNotify, PacketOpcodes.PlayerLuaShellNotify);
|
||||||
}
|
}
|
||||||
|
@ -158,6 +158,12 @@ public class GameSession extends KcpChannel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DO NOT REMOVE (unless we find a way to validate code before sending to client which I don't think we can)
|
||||||
|
// Stop WindSeedClientNotify from being sent for security purposes.
|
||||||
|
if(PacketOpcodes.BANNED_PACKETS.contains(packet.getOpcode())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
if (packet.shouldBuildHeader()) {
|
if (packet.shouldBuildHeader()) {
|
||||||
packet.buildHeader(this.getNextClientSequence());
|
packet.buildHeader(this.getNextClientSequence());
|
||||||
|
Loading…
Reference in New Issue
Block a user