Skip to content

fix(webhooks): reject blank webhook delete ids - #164

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/webhook-delete-id-guard
Jul 30, 2026
Merged

fix(webhooks): reject blank webhook delete ids#164
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/webhook-delete-id-guard

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • Reject blank webhook ids in the DELETE route before building the Supabase delete query.
  • Trim the route param before matching the webhook id so whitespace-only ids cannot reach .eq('id', ...).
  • Add a focused regression test that asserts blank ids return 400 and do not call delete.

Validation

  • node --check src/app/api/webhooks/[id]/route.js
  • node --check src/app/api/webhooks/[id]/route.test.js
  • git diff --check

I also attempted the focused Vitest file, but this checkout fails before test collection because @vitejs/plugin-react imports Vite ./internal, which is not exported by the installed Vite package in this Windows/Node environment. The regression test is included in the PR for maintainers' normal CI/runtime.

@ralyodio
ralyodio merged commit de5d6ae into profullstack:master Jul 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants