Rapsys Git
/
userbundle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e93d2ca
)
Replace kernel.secret value with env APP_SECRET
0.1.2
author
Raphaël Gertz
<git@rapsys.eu>
Wed, 14 Oct 2020 01:38:48 +0000
(
03:38
+0200)
committer
Raphaël Gertz
<git@rapsys.eu>
Wed, 14 Oct 2020 01:38:48 +0000
(
03:38
+0200)
Utils/Slugger.php
patch
|
blob
|
history
diff --git
a/Utils/Slugger.php
b/Utils/Slugger.php
index 8a2856dbede56b0b19e63fa9ef92906455531af5..b3f18e240b5ff87c25fe0929a806044651f0617f 100644
(file)
--- 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