diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java index 239857a7..578c7f21 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java @@ -29,12 +29,12 @@ public void init(LaunchServer server) { @Override public boolean canGetProfile(ClientProfile profile, Client client) { - return !profile.isLimited() || isWhitelisted("launchserver.profile.%s.show", profile, client); + return (client.isAuth && !profile.isLimited()) || isWhitelisted("launchserver.profile.%s.show", profile, client); } @Override public boolean canChangeProfile(ClientProfile profile, Client client) { - return !profile.isLimited() || isWhitelisted("launchserver.profile.%s.enter", profile, client); + return (client.isAuth && !profile.isLimited()) || isWhitelisted("launchserver.profile.%s.enter", profile, client); } @Override diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index ee46dc8f..e7e21cdf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -31,7 +31,6 @@ import pro.gravit.launchserver.socket.response.secure.SecurityReportResponse; import pro.gravit.launchserver.socket.response.secure.VerifySecureLevelKeyResponse; import pro.gravit.launchserver.socket.response.update.LauncherResponse; -import pro.gravit.launchserver.socket.response.update.UpdateListResponse; import pro.gravit.launchserver.socket.response.update.UpdateResponse; import pro.gravit.utils.BiHookSet; import pro.gravit.utils.HookSet; @@ -74,7 +73,6 @@ public static void registerResponses() { providers.register("joinServer", JoinServerResponse.class); providers.register("profiles", ProfilesResponse.class); providers.register("launcher", LauncherResponse.class); - providers.register("updateList", UpdateListResponse.class); providers.register("setProfile", SetProfileResponse.class); providers.register("update", UpdateResponse.class); providers.register("batchProfileByUsername", BatchProfileByUsername.class); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java deleted file mode 100644 index 5d3d7d67..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -package pro.gravit.launchserver.socket.response.update; - -import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.base.events.request.UpdateListRequestEvent; -import pro.gravit.launchserver.socket.Client; -import pro.gravit.launchserver.socket.response.SimpleResponse; - -import java.util.HashSet; - -public class UpdateListResponse extends SimpleResponse { - - @Override - public String getType() { - return "updateList"; - } - - @Override - public void execute(ChannelHandlerContext ctx, Client client) { - if (!client.isAuth) { - sendError("Access denied"); - return; - } - HashSet set = server.updatesManager.getUpdatesList(); - sendResult(new UpdateListRequestEvent(set)); - } - -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateListRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateListRequestEvent.java deleted file mode 100644 index ba5962dc..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateListRequestEvent.java +++ /dev/null @@ -1,24 +0,0 @@ -package pro.gravit.launcher.base.events.request; - -import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.base.events.RequestEvent; - -import java.util.HashSet; -import java.util.UUID; - - -public class UpdateListRequestEvent extends RequestEvent { - @SuppressWarnings("unused") - private static final UUID uuid = UUID.fromString("5fa836ae-6b61-401c-96ac-d8396f07ec6b"); - @LauncherNetworkAPI - public final HashSet dirs; - - public UpdateListRequestEvent(HashSet dirs) { - this.dirs = dirs; - } - - @Override - public String getType() { - return "updateList"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java deleted file mode 100644 index 1406e132..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java +++ /dev/null @@ -1,13 +0,0 @@ -package pro.gravit.launcher.base.request.update; - -import pro.gravit.launcher.base.events.request.UpdateListRequestEvent; -import pro.gravit.launcher.base.request.Request; -import pro.gravit.launcher.base.request.websockets.WebSocketRequest; - -public final class UpdateListRequest extends Request implements WebSocketRequest { - - @Override - public String getType() { - return "updateList"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java index 11fd7493..a3e3a345 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java @@ -94,7 +94,6 @@ public void registerResults() { results.register("batchProfileByUsername", BatchProfileByUsernameRequestEvent.class); results.register("profiles", ProfilesRequestEvent.class); results.register("setProfile", SetProfileRequestEvent.class); - results.register("updateList", UpdateListRequestEvent.class); results.register("error", ErrorRequestEvent.class); results.register("update", UpdateRequestEvent.class); results.register("getAvailabilityAuth", GetAvailabilityAuthRequestEvent.class); diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd491..e6441136 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2ea3535d..e7646dea 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME