Doctrine cannot handle bare random non-utf8 strings
This commit is contained in:
parent
92501eb0af
commit
751abe10d5
@ -99,7 +99,7 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices
|
|||||||
}
|
}
|
||||||
|
|
||||||
$series = $persistentToken->getSeries();
|
$series = $persistentToken->getSeries();
|
||||||
$tokenValue = $this->secureRandom->nextBytes(64);
|
$tokenValue = base64_encode($this->secureRandom->nextBytes(64));
|
||||||
$this->tokenProvider->updateToken($series, $tokenValue, new \DateTime());
|
$this->tokenProvider->updateToken($series, $tokenValue, new \DateTime());
|
||||||
$request->attributes->set(self::COOKIE_ATTR_NAME,
|
$request->attributes->set(self::COOKIE_ATTR_NAME,
|
||||||
new Cookie(
|
new Cookie(
|
||||||
@ -121,8 +121,8 @@ class PersistentTokenBasedRememberMeServices extends AbstractRememberMeServices
|
|||||||
*/
|
*/
|
||||||
protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token)
|
protected function onLoginSuccess(Request $request, Response $response, TokenInterface $token)
|
||||||
{
|
{
|
||||||
$series = $this->secureRandom->nextBytes(64);
|
$series = base64_encode($this->secureRandom->nextBytes(64));
|
||||||
$tokenValue = $this->secureRandom->nextBytes(64);
|
$tokenValue = base64_encode($this->secureRandom->nextBytes(64));
|
||||||
|
|
||||||
$this->tokenProvider->createNewToken(
|
$this->tokenProvider->createNewToken(
|
||||||
new PersistentToken(
|
new PersistentToken(
|
||||||
|
Reference in New Issue
Block a user