From b6b3788f146f655673edda67eb53fc377feecd67 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 5 Sep 2022 21:35:38 +0100 Subject: [PATCH] Change socket is verified check --- .../socket/listener/WebEditorSocketListener.java | 2 +- standalone/loader/build.gradle | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/webeditor/socket/listener/WebEditorSocketListener.java b/common/src/main/java/me/lucko/luckperms/common/webeditor/socket/listener/WebEditorSocketListener.java index e50676ed1..f3f23b3b4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/webeditor/socket/listener/WebEditorSocketListener.java +++ b/common/src/main/java/me/lucko/luckperms/common/webeditor/socket/listener/WebEditorSocketListener.java @@ -129,7 +129,7 @@ public class WebEditorSocketListener extends WebSocketListener { // check signature to ensure the message is from the connected editor PublicKey remotePublicKey = this.socket.getRemotePublicKey(); - boolean verified = remotePublicKey == null || CryptographyUtils.verify(remotePublicKey, innerMsg, signature); + boolean verified = remotePublicKey != null && CryptographyUtils.verify(remotePublicKey, innerMsg, signature); // parse the inner message JsonObject msg = GsonProvider.parser().parse(innerMsg).getAsJsonObject(); diff --git a/standalone/loader/build.gradle b/standalone/loader/build.gradle index aad5b49e1..0098875b2 100644 --- a/standalone/loader/build.gradle +++ b/standalone/loader/build.gradle @@ -2,6 +2,7 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCach plugins { id 'com.github.johnrengelman.shadow' + id 'application' } dependencies { @@ -10,12 +11,8 @@ dependencies { implementation project(':standalone:app') } -jar { - manifest { - attributes( - 'Main-Class': 'me.lucko.luckperms.standalone.loader.StandaloneLoader' - ) - } +application { + mainClass = 'me.lucko.luckperms.standalone.loader.StandaloneLoader' } processResources {