From 195f1dc9c017344921d41136b135b1dccf6a7a0f Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:41:45 +0100 Subject: [PATCH 1/2] Fixed Account Log filter --- .../user/[id]/_components/AccountLog.tsx | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx b/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx index d39c4493..a12a4cc5 100644 --- a/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx +++ b/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx @@ -12,16 +12,20 @@ export const AccountLog = ({ sameIPLogs, userId }: { sameIPLogs: Log[]; userId: const tableRef = useRef(null); return (
-
-

- Account Log -

-

- Hier werden Logs angezeigt, die dem Nutzer zugeordnet sind oder von der selben IP stammen. -

-
+

+ Account Log +

+

+ Hier werden Logs angezeigt, die dem Nutzer zugeordnet sind oder von der selben IP + stammen. +

+
+ } rightOfPagination={
{ return { AND: [ + onlyImportant + ? { + type: { + in: ["REGISTER", "PROFILE_CHANGE"], + }, + } + : {}, { - OR: [ + AND: [ { ip: { contains: searchTerm } }, { browser: { contains: searchTerm } }, { @@ -58,24 +69,6 @@ export const AccountLog = ({ sameIPLogs, userId }: { sameIPLogs: Log[]; userId: }, ], }, - onlyImportant - ? { - OR: [ - { - id: { - in: sameIPLogs - .filter((log) => log.id.toString().includes(searchTerm)) - .map((log) => log.id), - }, - }, - { - type: { - in: ["REGISTER", "PROFILE_CHANGE"], - }, - }, - ], - } - : {}, ], } as Prisma.LogWhereInput; }} From cc29ac3e146338a9e14fba938e6beaed58fd9e18 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:49:17 +0100 Subject: [PATCH 2/2] List headers --- apps/hub/app/(auth)/login/_components/action.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/hub/app/(auth)/login/_components/action.ts b/apps/hub/app/(auth)/login/_components/action.ts index 155a1ebc..dc120a02 100644 --- a/apps/hub/app/(auth)/login/_components/action.ts +++ b/apps/hub/app/(auth)/login/_components/action.ts @@ -35,6 +35,8 @@ export const logAction = async ( const headersList = await headers(); const user = await getServerSession(); + console.log(Array.from(headersList.entries())); + const ip = headersList.get("X-Forwarded-For") || headersList.get("Forwarded") ||