Secure profile photo uploads and trust configured production origin
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 8m53s

This commit is contained in:
2026-10-15 14:00:46 +05:00
parent 07cd0993a0
commit 930e00a736
5 changed files with 198 additions and 71 deletions

View File

@@ -0,0 +1,13 @@
-- The application server is the only writer for public profile avatars. It
-- validates and re-encodes uploads, applies an account rate limit, and removes
-- replaced files. Client-side Storage uploads could bypass those controls.
drop policy if exists "MineGeo users upload their own avatars"
on storage.objects;
drop policy if exists "MineGeo users delete their own avatars"
on storage.objects;
update storage.buckets
set public = true,
file_size_limit = 5242880,
allowed_mime_types = array['image/webp']
where id = 'minegeo-avatars';