MAJ en Thelia 2.3.4

This commit is contained in:
2020-05-03 08:14:07 +02:00
parent 72ddf49e60
commit 35a800ca0e
328 changed files with 9560 additions and 14163 deletions

View File

@@ -82,7 +82,7 @@ class TokenProvider
}
/**
* @param $entryValue
* @param string $entryValue
* @return bool
* @throws \Thelia\Core\Security\Exception\TokenAuthenticationException
*/
@@ -92,14 +92,10 @@ class TokenProvider
throw new TokenAuthenticationException(
"Tried to check a token without assigning it before"
);
} else {
if ($this->token !== $entryValue) {
throw new TokenAuthenticationException(
"Tried to validate an invalid token"
);
} else {
$this->refreshToken();
}
} elseif ($this->token !== $entryValue) {
throw new TokenAuthenticationException(
"Tried to validate an invalid token"
);
}
return true;
@@ -118,6 +114,7 @@ class TokenProvider
{
return self::generateToken();
}
/**
* Same method as getToken but can be called statically
*