Change socket is verified check

This commit is contained in:
Luck 2022-09-05 21:35:38 +01:00
parent 6e0e0e8ae9
commit b6b3788f14
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 7 deletions

View File

@ -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();

View File

@ -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 {