From 2d65e345002e30dbda1082d124493a1038180a20 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sat, 30 May 2026 23:20:11 +0200 Subject: [PATCH] Update deps, docs, auth logic; add SixLabors license - Expanded copilot-instructions.md with project/routing details and ImageSharp license handling - Upgraded MailKit and MimeKit to v4.17.0 - Added sixlabors.lic for ImageSharp 4.x licensing - Removed SecretManagementExtensions.cs stub - Updated OCORE and OCORE_web submodules - Improved unauthorized access handling in IntranetController - Removed empty placeholder file --- .github/copilot-instructions.md | 2 +- .github/instructions/New Text Document.txt | 1 - Fuchs/Controllers/IntranetController.cs | 2 ++ Fuchs/Fuchs.csproj | 4 ++-- Fuchs/Services/SecretManagementExtensions.cs | 16 ---------------- Fuchs/sixlabors.lic | 1 + OCORE | 2 +- OCORE_web | 2 +- 8 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 .github/instructions/New Text Document.txt delete mode 100644 Fuchs/Services/SecretManagementExtensions.cs create mode 100644 Fuchs/sixlabors.lic diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 66f1a02..69b5b38 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,6 +1,5 @@ # Copilot Instructions - ## Project Overview - **Fuchs Intranet** is an ASP.NET Core (.NET 10) web application — the intranet IS the entire website, served from `/`. - Routes: `/{fn?}/{id?}/{code?}` → `IntranetController.Index`; `/do/{fn?}/{id?}/{code?}` → `IntranetController.Do`. @@ -30,6 +29,7 @@ - Make use of OCORE libraries where possible, especially for common tasks such as logging, configuration management, and data access. - Whenever possible, prefer OCORE_web_pdf / OCORE PDF functions for PDF-related tasks over rewriting. - Do not use OCMS or OCMS_sharp; use only OCORE or OCORE_web. +- For builds failing due to SixLabors.ImageSharp requiring a license (v4.0.0+), check copilot-instructions.md for the SixLabors license key/handling info before downgrading ImageSharp. ## Azure Key Vault — Secret Naming - Secret names must satisfy the pattern `^[0-9a-zA-Z-]+$` (alphanumerics and hyphens only; no underscores, dots, or spaces). diff --git a/.github/instructions/New Text Document.txt b/.github/instructions/New Text Document.txt deleted file mode 100644 index e48b7ea..0000000 --- a/.github/instructions/New Text Document.txt +++ /dev/null @@ -1 +0,0 @@ -- \ No newline at end of file diff --git a/Fuchs/Controllers/IntranetController.cs b/Fuchs/Controllers/IntranetController.cs index 86967fa..b752e28 100644 --- a/Fuchs/Controllers/IntranetController.cs +++ b/Fuchs/Controllers/IntranetController.cs @@ -91,8 +91,10 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller if (!UserIdent.IsAuthenticated && !(new string[] { "login","logout" }).Contains(fn.ToLower()) && !_allowedNonAuth.Contains(fn.ToLower())) { if (!_allowedGet.Contains(fn.ToLower()) && !_allowedGet.Contains($"{fn.ToLower()}|{id.ToLower()}")) + { _logger.LogInformation($"rejected function on do {fn}"); return Unauthorized401(); + } } try diff --git a/Fuchs/Fuchs.csproj b/Fuchs/Fuchs.csproj index 7735189..b690b6a 100644 --- a/Fuchs/Fuchs.csproj +++ b/Fuchs/Fuchs.csproj @@ -27,7 +27,7 @@ - + @@ -37,7 +37,7 @@ - + diff --git a/Fuchs/Services/SecretManagementExtensions.cs b/Fuchs/Services/SecretManagementExtensions.cs deleted file mode 100644 index 143f14c..0000000 --- a/Fuchs/Services/SecretManagementExtensions.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.AspNetCore.Builder; - -namespace OCORE_web.Secrets; - -/// -/// Placeholder for secret management extension methods. -/// Replace with a real Azure Key Vault / DPAPI implementation when ready. -/// -public static class SecretManagementExtensions -{ - /// - /// No-op stub. Wire up real secret management (e.g. Azure Key Vault) here. - /// - public static WebApplicationBuilder AddSecretManagement(this WebApplicationBuilder builder) - => builder; -} diff --git a/Fuchs/sixlabors.lic b/Fuchs/sixlabors.lic new file mode 100644 index 0000000..bb90bb4 --- /dev/null +++ b/Fuchs/sixlabors.lic @@ -0,0 +1 @@ +Id=ctm_01krg7sa3rpyvdbwx3mnvv1y4d;Kind=Community;ExpiryDateUtc=2027-08-11T11:27:58.0492360Z;Key=zHKV/xQMPGRV4RU3G7LQNunqLBoQBDsZmHPVN3AzxjuQ02NgCFxHBTkm6HanXsRbcmYCFjJm/PWdY+NOHt85fQ== diff --git a/OCORE b/OCORE index 9f48267..758c28e 160000 --- a/OCORE +++ b/OCORE @@ -1 +1 @@ -Subproject commit 9f4826767f6cd0a2736463fbaaff66a01505a389 +Subproject commit 758c28e93466b90aa74429d4cc53d59dbb418e68 diff --git a/OCORE_web b/OCORE_web index fd5b23e..8119238 160000 --- a/OCORE_web +++ b/OCORE_web @@ -1 +1 @@ -Subproject commit fd5b23ec77e64d89a57b7817e76f86bb98fa624c +Subproject commit 811923804f28d973ecb1684c4275166084baa3a7