mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-27 10:43:41 -04:00
Regenerate cookie ID after logging out (#7762)
To make the session cookie no longer usable if hijacked and put in another browser after user logs out
This commit is contained in:
@@ -226,6 +226,12 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
|
||||
if (Minz_Request::isPost()) {
|
||||
invalidateHttpCache();
|
||||
FreshRSS_Auth::removeAccess();
|
||||
|
||||
ini_set('session.use_cookies', '1');
|
||||
Minz_Session::lock();
|
||||
Minz_Session::regenerateID();
|
||||
Minz_Session::unlock();
|
||||
|
||||
Minz_Request::good(_t('feedback.auth.logout.success'), [ 'c' => 'index', 'a' => 'index' ]);
|
||||
} else {
|
||||
Minz_Error::error(403);
|
||||
|
||||
Reference in New Issue
Block a user