Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

security patch

Steven Tey1346678ecc0c
diff --git a/pages/api/projects/[slug]/index.ts b/pages/api/projects/[slug]/index.ts
index a07f991ae7..fb112042c9 100644
--- a/pages/api/projects/[slug]/index.ts
+++ b/pages/api/projects/[slug]/index.ts
@@ -19,7 +19,7 @@ export default withProjectAuth(
// DELETE /api/projects/[slug] – delete a project
} else if (req.method === "DELETE") {
const domain = req.body;
- if (!domain || typeof domain !== "string") {
+ if (!domain || typeof domain !== "string" || domain !== project.domain) {
return res
.status(400)
.json({ error: "Missing or misconfigured domain" });