Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
3ede7523
Commit
3ede7523
authored
May 06, 2022
by
4Benj_
Committed by
GitHub
May 06, 2022
Browse files
Stop WindSeedClientNotify and PlayerLuaShellNotify from being sent (#582)
parent
2e685785
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java
View file @
3ede7523
package
emu.grasscutter.net.packet
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
PacketOpcodes
{
// Empty
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_44
=
8983
;
public
static
final
int
UNKNOWN_45
=
943
;
public
static
final
List
<
Integer
>
BANNED_PACKETS
=
Arrays
.
asList
(
PacketOpcodes
.
WindSeedClientNotify
,
PacketOpcodes
.
PlayerLuaShellNotify
);
}
src/main/java/emu/grasscutter/server/game/GameSession.java
View file @
3ede7523
...
...
@@ -158,6 +158,12 @@ public class GameSession extends KcpChannel {
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
if
(
packet
.
shouldBuildHeader
())
{
packet
.
buildHeader
(
this
.
getNextClientSequence
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment