Security Hardening
Addresses multiple security findings from code review.
Fixes
- XSS (High):
linkifyText()now percent-encodes raw"and'in URLs before inserting intohrefattributes.escapeHtml()viatextContent/innerHTMLdoes not escape quotes. - Stats filter (Medium): Fixed JSON string-key vs
inttype mismatch that caused per-chat filtering to silently fail. Also removesmedia_files/total_size_mbfor restricted users (no per-chat breakdown available). - Deletion path (Medium): Unknown-chat deletions now resolve the chat ID from DB first, apply rate limiting, skip ambiguous message IDs (same ID in multiple chats), and send viewer notifications.
- Folders (Low): Restricted users no longer see empty folder names/emoticons for folders with 0 accessible chats.
- Push endpoint (Low):
/internal/pushaccepts loopback + RFC1918/Docker private IPs to support split-container SQLite mode viaVIEWER_HOST/VIEWER_PORT.
Breaking Changes
delete_message_by_id_any_chat()replaced byresolve_message_chat_id()in the database adapter. The old method deleted from ALL chats with a matching message ID — the new approach resolves to a single chat first and skips ambiguous cases.
What's Changed
Full Changelog: v7.3.2...v7.4.0