From 90acf181f33391d92bc26f9e9dbb83d70d01bb4c Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Tue, 28 Apr 2026 01:44:37 +0200 Subject: [PATCH] fix: harden plugin config, TOTP token exchange, and branding file serving --- app/admin/layout.tsx | 2 ++ app/api/admin/branding/[filename]/route.ts | 8 +++++ app/api/admin/plugins/[id]/config/route.ts | 36 ++++++++++++++++--- app/api/auth/totp-token-exchange/route.ts | 40 ++++++++++++++++------ instrumentation.node.ts | 3 +- lib/oauth/discovery.ts | 15 +++++++- 6 files changed, 86 insertions(+), 18 deletions(-) diff --git a/app/admin/layout.tsx b/app/admin/layout.tsx index 41fe9e05..7d8a819b 100644 --- a/app/admin/layout.tsx +++ b/app/admin/layout.tsx @@ -14,6 +14,7 @@ import { KeyRound, Puzzle, SwatchBook, + Activity, Mail, Calendar, BookUser, @@ -56,6 +57,7 @@ const NAV_GROUPS = [ { label: 'System', items: [ + { href: '/admin/telemetry', label: 'Telemetry', icon: Activity }, { href: '/admin/logs', label: 'Audit Log', icon: ScrollText }, ], }, diff --git a/app/api/admin/branding/[filename]/route.ts b/app/api/admin/branding/[filename]/route.ts index af8ab53a..d4994c50 100644 --- a/app/api/admin/branding/[filename]/route.ts +++ b/app/api/admin/branding/[filename]/route.ts @@ -53,11 +53,19 @@ export async function GET( const buffer = await readFile(resolved); + // SVG can carry inline