fix: add folder exists check to dashboard router endpoint

This commit is contained in:
Scott Wilson
2025-08-29 10:46:59 -07:00
parent 7f958e6d89
commit cf64c89ea3
3 changed files with 36 additions and 0 deletions
@@ -703,6 +703,9 @@ export const registerDashboardRouter = async (server: FastifyZodProvider) => {
// prevent older projects from accessing endpoint
if (!shouldUseSecretV2Bridge) throw new BadRequestError({ message: "Project version not supported" });
// verify folder exists and user has project permission
await server.services.folder.getFolderByPath({ projectId, environment, secretPath }, req.permission);
const tags = req.query.tags?.split(",") ?? [];
let remainingLimit = limit;