diff --git a/ProjectLighthouse/Controllers/LoginController.cs b/ProjectLighthouse/Controllers/LoginController.cs index 02ed9740..173d49fb 100644 --- a/ProjectLighthouse/Controllers/LoginController.cs +++ b/ProjectLighthouse/Controllers/LoginController.cs @@ -41,10 +41,19 @@ namespace LBPUnion.ProjectLighthouse.Controllers { loginData = null; } - if (loginData == null) return this.BadRequest(); + + if (loginData == null) + { + Logger.Log("loginData was null, rejecting login", LoggerLevelLogin.Instance); + return this.BadRequest(); + } IPAddress? remoteIpAddress = this.HttpContext.Connection.RemoteIpAddress; - if (remoteIpAddress == null) return this.StatusCode(403, ""); // 403 probably isnt the best status code for this, but whatever + if (remoteIpAddress == null) + { + Logger.Log("unable to determine ip, rejecting login", LoggerLevelLogin.Instance); + return this.StatusCode(403, ""); // 403 probably isnt the best status code for this, but whatever + } string ipAddress = remoteIpAddress.ToString(); @@ -56,11 +65,19 @@ namespace LBPUnion.ProjectLighthouse.Controllers if (token == null) // If we cant find an existing token, try to generate a new one { token = await this.database.AuthenticateUser(loginData, ipAddress, titleId); - if (token == null) return this.StatusCode(403, ""); // If not, then 403. + if (token == null) + { + Logger.Log("unable to find/generate a token, rejecting login", LoggerLevelLogin.Instance); + return this.StatusCode(403, ""); // If not, then 403. + } } User? user = await this.database.UserFromGameToken(token, true); - if (user == null) return this.StatusCode(403, ""); + if (user == null) + { + Logger.Log("unable to find a user from a token, rejecting login", LoggerLevelLogin.Instance); + return this.StatusCode(403, ""); + } if (ServerSettings.Instance.UseExternalAuth) { @@ -75,6 +92,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers DeniedAuthenticationHelper.AddAttempt(ipAddressAndName); await this.database.SaveChangesAsync(); + Logger.Log("too many denied logins, rejecting login", LoggerLevelLogin.Instance); return this.StatusCode(403, ""); } } @@ -104,7 +122,11 @@ namespace LBPUnion.ProjectLighthouse.Controllers await this.database.SaveChangesAsync(); - if (!token.Approved) return this.StatusCode(403, ""); + if (!token.Approved) + { + Logger.Log("token unapproved, rejecting login", LoggerLevelLogin.Instance); + return this.StatusCode(403, ""); + } Logger.Log($"Successfully logged in user {user.Username} as {token.GameVersion} client ({titleId})", LoggerLevelLogin.Instance); // After this point we are now considering this session as logged in. diff --git a/ProjectLighthouse/StaticFiles/android-chrome-192x192.png b/ProjectLighthouse/StaticFiles/android-chrome-192x192.png index 9b3eab52..f7ce477c 100644 Binary files a/ProjectLighthouse/StaticFiles/android-chrome-192x192.png and b/ProjectLighthouse/StaticFiles/android-chrome-192x192.png differ diff --git a/ProjectLighthouse/StaticFiles/android-chrome-512x512.png b/ProjectLighthouse/StaticFiles/android-chrome-512x512.png index 09f9e579..ba90a187 100644 Binary files a/ProjectLighthouse/StaticFiles/android-chrome-512x512.png and b/ProjectLighthouse/StaticFiles/android-chrome-512x512.png differ diff --git a/ProjectLighthouse/StaticFiles/apple-touch-icon.png b/ProjectLighthouse/StaticFiles/apple-touch-icon.png index e87773fa..3c56ec58 100644 Binary files a/ProjectLighthouse/StaticFiles/apple-touch-icon.png and b/ProjectLighthouse/StaticFiles/apple-touch-icon.png differ diff --git a/ProjectLighthouse/StaticFiles/browserconfig.xml b/ProjectLighthouse/StaticFiles/browserconfig.xml index b3930d0f..212c880d 100644 --- a/ProjectLighthouse/StaticFiles/browserconfig.xml +++ b/ProjectLighthouse/StaticFiles/browserconfig.xml @@ -3,7 +3,7 @@ - #da532c + #008cff diff --git a/ProjectLighthouse/StaticFiles/favicon-16x16.png b/ProjectLighthouse/StaticFiles/favicon-16x16.png index e3ef0781..dfd981f8 100644 Binary files a/ProjectLighthouse/StaticFiles/favicon-16x16.png and b/ProjectLighthouse/StaticFiles/favicon-16x16.png differ diff --git a/ProjectLighthouse/StaticFiles/favicon-32x32.png b/ProjectLighthouse/StaticFiles/favicon-32x32.png index bc34a6c1..db29acfa 100644 Binary files a/ProjectLighthouse/StaticFiles/favicon-32x32.png and b/ProjectLighthouse/StaticFiles/favicon-32x32.png differ diff --git a/ProjectLighthouse/StaticFiles/favicon.ico b/ProjectLighthouse/StaticFiles/favicon.ico index af563a7c..0343de4c 100644 Binary files a/ProjectLighthouse/StaticFiles/favicon.ico and b/ProjectLighthouse/StaticFiles/favicon.ico differ diff --git a/ProjectLighthouse/StaticFiles/mstile-150x150.png b/ProjectLighthouse/StaticFiles/mstile-150x150.png index 1825f73d..b0bbb2fc 100644 Binary files a/ProjectLighthouse/StaticFiles/mstile-150x150.png and b/ProjectLighthouse/StaticFiles/mstile-150x150.png differ diff --git a/ProjectLighthouse/StaticFiles/safari-pinned-tab.svg b/ProjectLighthouse/StaticFiles/safari-pinned-tab.svg index 51454694..7d1fcf3c 100644 --- a/ProjectLighthouse/StaticFiles/safari-pinned-tab.svg +++ b/ProjectLighthouse/StaticFiles/safari-pinned-tab.svg @@ -2,222 +2,350 @@ Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - - - - - - + + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProjectLighthouse/StaticFiles/site.webmanifest b/ProjectLighthouse/StaticFiles/site.webmanifest index b20abb7c..9f2f6643 100644 --- a/ProjectLighthouse/StaticFiles/site.webmanifest +++ b/ProjectLighthouse/StaticFiles/site.webmanifest @@ -1,6 +1,6 @@ { - "name": "", - "short_name": "", + "name": "Project Lighthouse", + "short_name": "Lighthouse", "icons": [ { "src": "/android-chrome-192x192.png", @@ -13,7 +13,7 @@ "type": "image/png" } ], - "theme_color": "#ffffff", - "background_color": "#ffffff", + "theme_color": "#008cff", + "background_color": "#008cff", "display": "standalone" } diff --git a/README.md b/README.md index 9ece56f8..d87d9bf7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Project Lighthouse -Project Lighthouse is an umbrella project for all work to investigate and develop private servers for LittleBigPlanet. -This project is the main server component that LittleBigPlanet games connect to. +Project Lighthouse is a clean-room, open-source custom server for LittleBigPlanet. This is a project conducted by the [LBP Union Ministry of Technology Research and Development team.](https://www.lbpunion.com/technology) For concerns and inquiries about the project, please [contact us here.](https://www.lbpunion.com/contact) For general questions and discussion about Project Lighthouse, please see the [megathread](https://www.lbpunion.com/forum/union-hall/project-lighthouse-littlebigplanet-private-servers-megathread) on our forum. ## WARNING!