mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-21 10:44:34 -04:00
Use HTTP POST for logout (#7489)
* Use HTTP POST for logout To avoid potential CSRF risks * Fixed button font issue * Minor whitespace
This commit is contained in:
1 parent
711a14fd9c
commit
d858053a7c
28 files changed
+179
-132
No files matched your search
@@ -223,9 +223,13 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
|
||||
* This action removes all accesses of the current user.
|
||||
*/
|
||||
public function logoutAction(): void {
|
||||
invalidateHttpCache();
|
||||
FreshRSS_Auth::removeAccess();
|
||||
Minz_Request::good(_t('feedback.auth.logout.success'), [ 'c' => 'index', 'a' => 'index' ]);
|
||||
if (Minz_Request::isPost()) {
|
||||
invalidateHttpCache();
|
||||
FreshRSS_Auth::removeAccess();
|
||||
Minz_Request::good(_t('feedback.auth.logout.success'), [ 'c' => 'index', 'a' => 'index' ]);
|
||||
} else {
|
||||
Minz_Error::error(403);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user