- Uploaded images are checked by magic bytes; the key extension and stored
Content-Type come from the detected format, not from the client's filename
(an .html file sent as image/png was stored as <uuid>.html).
- /api/v1/ads-media streams from MinIO instead of loading whole videos into
the heap, answers Range requests with 206 (iOS Safari needs it for video)
and sets a long public Cache-Control for immutable keys.
- The bucket lifecycle rule expired every object after 180 days, including
avatars and images of live posts; now only noncurrent versions expire.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refresh JWT carried no role but was accepted by JwtAuthenticationFilter and
the STOMP CONNECT as an access token; tokens now carry a typ claim and the
filters accept only access tokens (legacy tokens are told apart by role).
- Refresh rotation uses GETDEL, so one refresh token cannot be spent twice;
refresh tokens are no longer written to logs.
- isCurrentUserAdmin and file deletion compared authorities with "ADMIN"
instead of "ROLE_ADMIN", so admins were never recognised.
- getCurrentUser answers 401 for anonymous requests; profile update keeps the
login when the field is not sent; registration rejects empty login/password.
- GlobalExceptionHandler turned AccessDenied, BadCredentials, EntityNotFound,
Spring MVC 4xx errors and upload limits into 500.
- Presigned URL TTL is capped at 7 days.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Photos from iPhone (3-10 MB, 12-24 MP) were stored and served as-is, so the
feed loaded slowly on first open. Images are now downscaled to 1600px,
rotated by EXIF and re-encoded as progressive JPEG on upload. The
/api/v1/files proxy now sends Cache-Control instead of Spring Security's
no-store, so images are not re-downloaded on every app open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>