mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-11-09 02:52:57 -05:00
* Use keyed hash (HMAC-SHA256) for favicon cache keys The favicon cache key was a CRC-32 checksum of the salt-prefixed feed website URL (or feed icon URL). CRC-32 is linear, so collisions for equal-length inputs are independent of the salt prefix: a user could compute offline a website URL for their own feed colliding into another feed's cache slot, overwrite the shared data/favicons/<hash>.txt, and have the unauthenticated public favicon endpoint fetch and serve their image to every user of the instance. Replace the checksum with a keyed hash (HMAC-SHA256, instance salt as key, truncated to 16 hex chars) so the cache key cannot be forged without the secret salt. * Preserve legacy custom favicons when upgrading cache keys * Base64 hash (shorter) and native copy --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Inverle <inverle@proton.me>