From a5144443a48e6df15521136710bf3450876d3d0e Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 15 Mar 2026 22:02:27 +0100 Subject: [PATCH] =?UTF-8?q?fix(avatar)=20:=20address=20review=20findings?= =?UTF-8?q?=20=E2=80=94=20security=20and=20UX=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use getMimeType() instead of getClientMimeType() to prevent MIME spoofing - Change IsGranted to IS_AUTHENTICATED_FULLY so ROLE_CLIENT can access avatars - Remove Groups from avatarFileName (only avatarUrl needed by frontend) - Disable aggressive caching to prevent stale avatar images - Add error handling to avatar upload in profile page - Use i18n for "Mon profil" button text Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/components/ui/AppTopNav.vue | 2 +- frontend/pages/profile.vue | 8 ++++++-- src/Controller/UserAvatarController.php | 10 +++++----- src/Entity/User.php | 1 - 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/components/ui/AppTopNav.vue b/frontend/components/ui/AppTopNav.vue index 5b05a03..bb6776f 100644 --- a/frontend/components/ui/AppTopNav.vue +++ b/frontend/components/ui/AppTopNav.vue @@ -19,7 +19,7 @@ class="block w-full px-3 py-2 text-left hover:bg-neutral-100" @click="navigateTo('/profile')" > - Mon profil + {{ $t('profile.title') }}