security: P0 fixes — IDOR on incident/CAPA, CAPA non-owner write, timing-safe recheck cron, auth callback open redirect

This commit is contained in:
2026-07-12 20:36:28 +08:00
parent dba79c0f17
commit 1879def32c
4 changed files with 39 additions and 6 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ import { NextResponse } from 'next/server'
export async function GET(request: Request) {
const { searchParams, origin } = new URL(request.url)
const code = searchParams.get('code')
const next = searchParams.get('next') ?? '/'
const nextRaw = searchParams.get('next') ?? '/'
const next = nextRaw.startsWith('/') && !nextRaw.startsWith('//') ? nextRaw : '/'
if (code) {
const supabase = await createClient()