Skip to content

Commit

Permalink
Merge pull request #177 from pedrolivaresanchez/security/policy-post-…
Browse files Browse the repository at this point in the history
…limit

security fix: policy post limit per minute
  • Loading branch information
patrickwebsdev authored Nov 9, 2024
2 parents 4e172df + 1aefd3d commit d46a139
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 d46a139

Please sign in to comment.