It works.Is it safe?
app/actions/projects.ts:17app/api/stripe/route.ts:29app/dashboard/page.tsx:226/6
X-ray codeexport async function updateProjectTitle(projectId, title) {
const session = await getSession();
if (!session) throw new Error("Unauthorized");
// Missing ownership check: any signed-in user
return db.project.update({
where: { id: projectId },
data: { title },
});
}Code review and hardening · 6 min read