Skip to content

Commit a8c16d6

Browse files
author
Deko Ration
committed
Fix plugin message channel exploit
1 parent e9bc926 commit a8c16d6

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

multichat/dependency-reduced-pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>xyz.olivermartin.multichat</groupId>
55
<artifactId>multichat</artifactId>
6-
<version>1.9.5</version>
6+
<version>1.9.6</version>
77
<build>
88
<plugins>
99
<plugin>
@@ -148,7 +148,7 @@
148148
<dependency>
149149
<groupId>net.md-5</groupId>
150150
<artifactId>bungeecord-api</artifactId>
151-
<version>1.16-R0.2-SNAPSHOT</version>
151+
<version>1.16-R0.4-SNAPSHOT</version>
152152
<scope>provided</scope>
153153
<exclusions>
154154
<exclusion>
@@ -184,7 +184,7 @@
184184
<dependency>
185185
<groupId>net.md-5</groupId>
186186
<artifactId>bungeecord-api</artifactId>
187-
<version>1.16-R0.2-SNAPSHOT</version>
187+
<version>1.16-R0.4-SNAPSHOT</version>
188188
<type>javadoc</type>
189189
<scope>provided</scope>
190190
<exclusions>

multichat/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>xyz.olivermartin.multichat</groupId>
77
<artifactId>multichat</artifactId>
8-
<version>1.9.5</version>
8+
<version>1.9.6</version>
99

1010
<repositories>
1111

@@ -117,15 +117,15 @@
117117
<dependency>
118118
<groupId>net.md-5</groupId>
119119
<artifactId>bungeecord-api</artifactId>
120-
<version>1.16-R0.2-SNAPSHOT</version>
120+
<version>1.16-R0.4-SNAPSHOT</version>
121121
<type>jar</type>
122122
<scope>provided</scope>
123123
</dependency>
124124

125125
<dependency>
126126
<groupId>net.md-5</groupId>
127127
<artifactId>bungeecord-api</artifactId>
128-
<version>1.16-R0.2-SNAPSHOT</version>
128+
<version>1.16-R0.4-SNAPSHOT</version>
129129
<type>javadoc</type>
130130
<scope>provided</scope>
131131
</dependency>

multichat/src/main/java/xyz/olivermartin/multichat/bungee/BungeeComm.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,21 +180,14 @@ public static void sendPlayerChannelMessage(String playerName, String channel, C
180180

181181
@EventHandler
182182
public void onPluginMessage(PluginMessageEvent ev) {
183-
if (! (ev.getTag().equals("multichat:comm") || ev.getTag().equals("multichat:chat") || ev.getTag().equals("multichat:prefix") || ev.getTag().equals("multichat:suffix") || ev.getTag().equals("multichat:dn") || ev.getTag().equals("multichat:world") || ev.getTag().equals("multichat:nick") || ev.getTag().equals("multichat:pxe") || ev.getTag().equals("multichat:ppxe")) ) {
183+
if (!ev.getTag().startsWith("multichat:"))
184184
return;
185-
}
186185

187186
if (!(ev.getSender() instanceof Server)) {
187+
ev.setCancelled(true);
188188
return;
189189
}
190190

191-
if (ev.getTag().equals("multichat:comm")) {
192-
193-
// TODO Remove - legacy
194-
return;
195-
196-
}
197-
198191
if (ev.getTag().equals("multichat:chat")) {
199192

200193
ev.setCancelled(true);

0 commit comments

Comments
 (0)