mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 02:11:52 -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:
1 parent
fe9ef3b506
commit
e967b07589
1 file changed
+6
@@ -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