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 1b34b7ac..6626c8fa 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 03de2060..e2a9dd29 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -30,7 +30,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; @@ -64,7 +63,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 bda0328b..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.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/events/request/UpdateListRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java deleted file mode 100644 index 5f54432c..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java +++ /dev/null @@ -1,24 +0,0 @@ -package pro.gravit.launcher.events.request; - -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.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/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java index c7c269fa..90983ad5 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/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 7f93135c..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 8838ba97..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.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME