Security Hardening (Round 2)
Fixes
- Avatar ACL bypass (Medium): Restricted users can no longer access avatars outside their allowed chats.
serve_media()andserve_thumbnail()now extractchat_idfrom avatar filenames and enforce per-chat scoping. - Push endpoint spoofing (Medium):
/internal/pushnow supports an optionalINTERNAL_PUSH_SECRETenv var as a bearer token. Prevents co-tenant containers from spoofing live events to connected browsers. - Reaction recovery data loss (Medium):
insert_reactions()now retries ALL reactions after a sequence reset, not just the row that triggered the duplicate-key error. Previously, thereturnafter a single retry silently dropped remaining reactions. - Push unsubscribe ownership (Low):
POST /api/push/unsubscribeis now scoped to the requesting user'susername, preventing cross-user endpoint removal.
New Environment Variable
INTERNAL_PUSH_SECRET: Optional shared secret for/internal/pushendpoint. Set the same value on both backup and viewer containers in multi-tenant Docker environments. If unset, IP-only auth is used (backward compatible).
What's Changed
Full Changelog: v7.4.0...v7.4.1