mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 02:37:34 +02:00
Ignore the correct channel
This commit is contained in:
@ -85,7 +85,7 @@ public class EncryptionUtil {
|
|||||||
/**
|
/**
|
||||||
* Decrypts the content and extracts the key spec.
|
* Decrypts the content and extracts the key spec.
|
||||||
*
|
*
|
||||||
* @param cipher decryption cipher initialized with the private key
|
* @param privateKey decryption cipher initialized with the private key
|
||||||
* @param sharedKey the encrypted shared key
|
* @param sharedKey the encrypted shared key
|
||||||
* @return shared secret key
|
* @return shared secret key
|
||||||
* @throws GeneralSecurityException if it fails to decrypt the data
|
* @throws GeneralSecurityException if it fails to decrypt the data
|
||||||
|
@ -38,7 +38,7 @@ public class PluginMessageListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPluginMessage(PluginMessageEvent pluginMessageEvent) {
|
public void onPluginMessage(PluginMessageEvent pluginMessageEvent) {
|
||||||
String channel = pluginMessageEvent.getTag();
|
String channel = pluginMessageEvent.getTag();
|
||||||
if (pluginMessageEvent.isCancelled() || !channel.startsWith(plugin.getName().toLowerCase())) {
|
if (pluginMessageEvent.isCancelled() || !channel.startsWith(plugin.getName())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public class PluginMessageListener implements Listener {
|
|||||||
pluginMessageEvent.setCancelled(true);
|
pluginMessageEvent.setCancelled(true);
|
||||||
|
|
||||||
if (!(pluginMessageEvent.getSender() instanceof Server)) {
|
if (!(pluginMessageEvent.getSender() instanceof Server)) {
|
||||||
//check if the message is sent from the server
|
//check if the message is sent really from the server and not a malicious client
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user