From 92c25d4b2b930bbcde1e45834878de380a6457ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Wed, 14 Oct 2020 03:38:48 +0200 Subject: [PATCH] Replace kernel.secret value with env APP_SECRET --- Utils/Slugger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/Slugger.php b/Utils/Slugger.php index 8a2856d..b3f18e2 100644 --- a/Utils/Slugger.php +++ b/Utils/Slugger.php @@ -23,7 +23,7 @@ class Slugger { //Retrieve secret and set offset from reduction public function __construct(ContainerInterface $container) { //Set secret - $this->secret = $container->getParameter('kernel.secret'); + $this->secret = $_SERVER['APP_SECRET'] ?? $container->getParameter('kernel.secret'); //Pseudo-random alphabet //XXX: use array flip and keys to workaround php "smart" that cast range('0', '9') as int instead of string -- 2.41.0