From 9e9a72af91c11eb277e89a5dfa5daf1a3b34e8a0 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 19 Mar 2022 11:18:01 +0200 Subject: [PATCH] fix --- .../Espo/Core/Authentication/AuthToken/EspoManager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/Espo/Core/Authentication/AuthToken/EspoManager.php b/application/Espo/Core/Authentication/AuthToken/EspoManager.php index a697af0796..29572ec5bd 100644 --- a/application/Espo/Core/Authentication/AuthToken/EspoManager.php +++ b/application/Espo/Core/Authentication/AuthToken/EspoManager.php @@ -52,7 +52,7 @@ class EspoManager implements Manager /** @var RDBRepository */ $repository = $entityManager->getRDBRepository(AuthTokenEntity::ENTITY_TYPE); - + $this->repository = $repository; } @@ -169,7 +169,10 @@ class EspoManager implements Manager } if (function_exists('openssl_random_pseudo_bytes')) { - return bin2hex(openssl_random_pseudo_bytes($length)); + /** @var string */ + $randomValue = openssl_random_pseudo_bytes($length); + + return bin2hex($randomValue); } throw new RuntimeException("Could not generate token.");