Implemented CSRF token validation on user logout

This commit is contained in:
Aman deep sharma
2025-02-25 16:25:06 +05:30
parent b13ef0a185
commit 89e3e434da
8 changed files with 8 additions and 8 deletions

View File

@@ -330,7 +330,7 @@ class FrontControllerCore extends Controller
$this->context->customer->logout();
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
} elseif (isset($_GET['mylogout'])) {
} elseif (isset($_GET['mylogout']) && $this->isTokenValid()) {
$this->context->customer->mylogout();
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
}