mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-28 14:08:45 -04:00
* auth: rotate session ID on all authenticated transitions (session fixation) The PHP session ID was regenerated on explicit form login, reauth, logout and password change, but NOT when access is (re)established from a remember-me cookie, via HTTP authentication, or on self-registration auto-login (CWE-384), so a fixed session ID could become authenticated. Regenerate the session ID at those transitions too: in FreshRSS_Auth::init when accessControl() first grants access (covers remember-me restore and HTTP auth; skipped for auth_type 'none', which has no authentication boundary), and in the self-registration auto-login path, mirroring the existing form-login idiom. Also enable session.use_strict_mode before session_start as defence in depth so an uninitialised, attacker-supplied session ID is not adopted. * auth: avoid duplicate cookie during session rotation * Code preferences, shorten some comments --------- Co-authored-by: Inverle <inverle@proton.me> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>