fix(evidence): disable HMAC token validation, use session auth only
This commit is contained in:
@@ -17,14 +17,8 @@ export async function GET(
|
|||||||
const { path: segments } = await params
|
const { path: segments } = await params
|
||||||
const filePath = segments.join('/')
|
const filePath = segments.join('/')
|
||||||
|
|
||||||
// Verify HMAC token (temporarily disabled for debugging)
|
// Token validation disabled - session + RLS provides auth
|
||||||
// const token = request.nextUrl.searchParams.get('token')
|
// TODO: implement client-side token generation and pass to frontend
|
||||||
// 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 })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Verify session
|
// Verify session
|
||||||
const session = await getSession()
|
const session = await getSession()
|
||||||
|
|||||||
Reference in New Issue
Block a user