From 9157fd39ae505a6fb6bffc180838c27990a153d0 Mon Sep 17 00:00:00 2001 From: jvyden Date: Mon, 13 Dec 2021 18:36:29 -0500 Subject: [PATCH] Reject unapproved tokens on login --- ProjectLighthouse/Controllers/LoginController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ProjectLighthouse/Controllers/LoginController.cs b/ProjectLighthouse/Controllers/LoginController.cs index d5085096..ced0fe44 100644 --- a/ProjectLighthouse/Controllers/LoginController.cs +++ b/ProjectLighthouse/Controllers/LoginController.cs @@ -97,6 +97,8 @@ namespace LBPUnion.ProjectLighthouse.Controllers await this.database.SaveChangesAsync(); + if (!token.Approved) return this.StatusCode(403, ""); + Logger.Log($"Successfully logged in user {user.Username} as {token.GameVersion} client ({titleId})", LoggerLevelLogin.Instance); // Create a new room on LBP2+/Vita