fix(evidence): disable HMAC token validation, use session auth only

This commit is contained in:
2026-08-16 09:39:57 +08:00
parent 3a25f6bc72
commit 5babb72699
+2 -8
View File
@@ -17,14 +17,8 @@ export async function GET(
const { path: segments } = await params
const filePath = segments.join('/')
// Verify HMAC token (temporarily disabled for debugging)
// const token = request.nextUrl.searchParams.get('token')
// if (!token) return new NextResponse('Missing token', { status: 401 })
// if (token.length !== 64) return new NextResponse('Invalid token', { status: 403 })
// const expected = signEvidencePath(filePath)
// if (!crypto.timingSafeEqual(Buffer.from(token, 'hex'), Buffer.from(expected, 'hex'))) {
// return new NextResponse('Invalid token', { status: 403 })
// }
// Token validation disabled - session + RLS provides auth
// TODO: implement client-side token generation and pass to frontend
// Verify session
const session = await getSession()