From 3b72583f89585bca20d17a99291742094d7d3da4 Mon Sep 17 00:00:00 2001 From: Dave Samojlenko Date: Thu, 16 Jan 2025 10:40:35 -0500 Subject: [PATCH] fix: Prevent access to Responses on unsaved form (#4986) * Prevent access to Responses on unsaved form * add check before checkKeyExists --------- Co-authored-by: Tim Arney --- .../form-builder/[id]/responses/[[...statusFilter]]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/responses/[[...statusFilter]]/page.tsx b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/responses/[[...statusFilter]]/page.tsx index 9df6685d03..b9dbaaef65 100644 --- a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/responses/[[...statusFilter]]/page.tsx +++ b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/responses/[[...statusFilter]]/page.tsx @@ -115,7 +115,7 @@ export default async function Page(props: { ); } - const isApiRetrieval = !!(await checkKeyExists(id)); + const isApiRetrieval = id !== "0000" && !!(await checkKeyExists(id)); const statusFilter = validateStatusFilterOrRedirect( statusFilterParams,