Skip to content

Commit

Permalink
Make sure token is properly used in legacy context
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRambaud committed Jul 16, 2019
1 parent 844ceb9 commit 74213bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/controller/AdminController.php
Expand Up @@ -789,11 +789,11 @@ public function checkToken()
}

$token = Tools::getValue('token');
if (!empty($token) && $token === $this->token) {
if ($token === $this->token) {
return true;
}

if (count($_POST) || !isset($_GET['controller']) || !Validate::isControllerName($_GET['controller']) || $token) {
if (count($_POST) || !isset($_GET['controller']) || !Validate::isControllerName($_GET['controller']) || !$token) {
return false;
}

Expand Down

0 comments on commit 74213bc

Please sign in to comment.