diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java index 29e7918d..092cf99f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java @@ -36,6 +36,9 @@ public static JwtTokenInfo getJwtInfoFromAccessToken(String token, ECPublicKey p } public static String makeRefreshTokenFromPassword(String username, String rawPassword, String secretSalt) { + if(rawPassword == null) { + rawPassword = ""; + } return SecurityHelper.toHex(SecurityHelper.digest(SecurityHelper.DigestAlgorithm.SHA256, String.format("%s.%s.%s.%s", secretSalt, username, rawPassword, secretSalt))); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreSessionRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreSessionRequestEvent.java index c3a4297c..70016c56 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreSessionRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreSessionRequestEvent.java @@ -2,6 +2,7 @@ import pro.gravit.launcher.events.RequestEvent; +@Deprecated public class RestoreSessionRequestEvent extends RequestEvent { public CurrentUserRequestEvent.UserInfo userInfo; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreSessionRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreSessionRequest.java index b1642b5f..4e256b6e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreSessionRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreSessionRequest.java @@ -7,6 +7,7 @@ import java.util.UUID; +@Deprecated public class RestoreSessionRequest extends Request implements WebSocketRequest { @LauncherNetworkAPI public final UUID session;