From f169236613319491e5877a4fa00f97a010a99f05 Mon Sep 17 00:00:00 2001 From: jvyden Date: Fri, 10 Jun 2022 04:34:17 -0400 Subject: [PATCH 01/40] Put title before instance name, fix empty webhook title trailing dash --- .../Pages/Layouts/BaseLayout.cshtml | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml index f19c67e2..5b65cd09 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml @@ -25,20 +25,23 @@ } Model.IsMobile = Model.Request.IsMobile(); + + string title; + if (Model.Title == string.Empty) + { + title = ServerConfiguration.Instance.Customization.ServerName; + } + else + { + title = $"{Model.Title} - {ServerConfiguration.Instance.Customization.ServerName}"; + } } - @if (Model.Title == string.Empty) - { - @ServerConfiguration.Instance.Customization.ServerName - } - else - { - @ServerConfiguration.Instance.Customization.ServerName - @Model.Title - } + @title @@ -52,7 +55,7 @@ @* Embed Stuff *@ - + @if (!string.IsNullOrEmpty(Model.Description)) { From eb21c7042fd220473f4cf0f0e2c75babd90d833e Mon Sep 17 00:00:00 2001 From: jvyden Date: Sat, 11 Jun 2022 18:43:30 -0400 Subject: [PATCH 02/40] Only allow a single approved IP address --- .config/dotnet-tools.json | 6 ++ .run/Lighthouse API.run.xml | 3 + .run/Lighthouse Game API.run.xml | 3 + .run/Lighthouse Website.run.xml | 3 + .../Controllers/LoginController.cs | 2 +- .../ExternalAuth/AutoApprovalController.cs | 23 ++----- .../ExternalAuth/AuthenticationPage.cshtml | 36 ++++++----- .../ManageUserApprovedIpAddressesPage.cshtml | 23 ------- ...anageUserApprovedIpAddressesPage.cshtml.cs | 26 -------- .../ProjectLighthouse.Servers.Website.csproj | 20 +++--- .../Startup/WebsiteStartup.cs | 5 +- ProjectLighthouse/Database.cs | 1 - ...0220611221819_OnlyAllowSingleApprovedIP.cs | 61 +++++++++++++++++++ .../Migrations/DatabaseModelSnapshot.cs | 33 +--------- ProjectLighthouse/PlayerData/Profiles/User.cs | 3 + .../Profiles/UserApprovedIpAddress.cs | 17 ------ 16 files changed, 124 insertions(+), 141 deletions(-) delete mode 100644 ProjectLighthouse.Servers.Website/Pages/ExternalAuth/ManageUserApprovedIpAddressesPage.cshtml delete mode 100644 ProjectLighthouse.Servers.Website/Pages/ExternalAuth/ManageUserApprovedIpAddressesPage.cshtml.cs create mode 100644 ProjectLighthouse/Migrations/20220611221819_OnlyAllowSingleApprovedIP.cs delete mode 100644 ProjectLighthouse/PlayerData/Profiles/UserApprovedIpAddress.cs diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index e80b80ff..e15fce7d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -7,6 +7,12 @@ "commands": [ "dotnet-ef" ] + }, + "dotnet-trace": { + "version": "6.0.328102", + "commands": [ + "dotnet-trace" + ] } } } \ No newline at end of file diff --git a/.run/Lighthouse API.run.xml b/.run/Lighthouse API.run.xml index 08ab248a..02490fb4 100644 --- a/.run/Lighthouse API.run.xml +++ b/.run/Lighthouse API.run.xml @@ -4,6 +4,9 @@