Commit Graph

12 Commits

Author SHA1 Message Date
SlimusMinus
1cd72fbec4 fixed show phone number 2026-10-27 22:49:16 +03:00
SlimusMinus
ee5fb4e0e0 Posts API: user posts page, 201 on create, userLogin, deprecate old routes
- GET /api/v1/users/{userId}/posts returns Page<PostResponse> (owner sees unpublished)
- POST /api/v1/posts returns 201 with the created PostResponse and Location
- PostResponse.userLogin; userEmail kept with the same value as deprecated
- GET /api/v1/posts/{userId} and /search?city= marked deprecated; search is paged
- CORS exposes Retry-After and Location to the frontend

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:50:05 +03:00
SlimusMinus
48351398b5 Add Redis rate limiting, login lockout, password policy and health probes
- RateLimitFilter: fixed-window counters in Redis (Lua INCR+PEXPIRE) per
  client IP for login, registration, refresh, check-login, post creation,
  uploads, chat start and public ad endpoints; 429 with Retry-After; fails
  open when Redis is down. Rules live in rate-limit.* in application.yaml.
- Login is blocked for an account after 10 failed attempts in 15 minutes,
  independent of the client IP.
- Registration requires a password of at least 8 characters.
- server.forward-headers-strategy=native so the client IP survives a reverse
  proxy; graceful shutdown.
- /actuator/health with liveness/readiness probes is public (no details).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:31:12 +03:00
SlimusMinus
5cd60b6318 Harden auth: separate access/refresh JWT, atomic refresh rotation, admin checks
- 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>
2026-10-20 00:56:38 +03:00
SlimusMinus
015b68d96d changed jdk on 25 springBoot on 3.5.6 and fix code 2026-09-30 00:27:10 +03:00
SlimusMinus
942cd09585 added advertising 2026-09-23 23:34:05 +03:00
SlimusMinus
7660128d96 added refresh token 2026-08-03 02:43:46 +03:00
SlimusMinus
a6fb187212 added ai-moderation image and text 2026-07-29 00:56:32 +03:00
SlimusMinus
f371a442d0 fixed image locale storage on minio 2026-07-10 01:27:30 +03:00
SlimusMinus
ec5cc6cedd added scheduler for delete old or found posts 2026-06-25 00:48:55 +03:00
SlimusMinus
c49f2d108b added reviews 2026-06-23 00:09:57 +03:00
SlimusMinus
bafb636cbe added security and fix edit profile 2026-06-18 00:22:50 +03:00