Skip to content

Commit

Permalink
security fix: policy post limit per minute
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwebsdev committed Nov 9, 2024
1 parent 4e172df commit 1aefd3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions supabase/migrations/20241109043158_limit_post_per_minute.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
create policy "limit_post_per_minute"
on "public"."help_requests"
as restrictive
for insert
to authenticated
with check ((NOT (EXISTS ( SELECT 1
FROM help_requests help_requests_1
WHERE ((help_requests_1.user_id = auth.uid()) AND (help_requests_1.created_at > (now() - '00:01:00'::interval)))))));

0 comments on commit 1aefd3d

Please sign in to comment.