Skip to content

Commit

Permalink
Fix panel.request.validateCsrf filter throwing an exception when no…
Browse files Browse the repository at this point in the history
… user is logged in
  • Loading branch information
giuscris committed Nov 3, 2024
1 parent 834bcfc commit 86e3858
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion panel/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@

if (!$csrfToken->validate($tokenName, $token)) {
$csrfToken->destroy($tokenName);
$panel->user()->logout();

if ($panel->isLoggedIn()) {
$panel->user()->logout();
}

$panel->notify(
$translations->getCurrent()->translate('panel.login.suspiciousRequestDetected'),
Expand Down

0 comments on commit 86e3858

Please sign in to comment.