Skip to content

Commit

Permalink
Merge pull request #128 from totten/1.x-master-rand37
Browse files Browse the repository at this point in the history
drush install - Bump up entropy for autogenerated creds. Add signing key.
  • Loading branch information
seamuslee001 authored May 21, 2021
2 parents 65e1214 + ad137c4 commit 808c08c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drush/civicrm.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,9 @@ function _civicrm_generate_settings_file($dbuser, $dbpass, $dbhost, $dbname, $mo
'CMSdbPass' => $db_spec['password'],
'CMSdbHost' => $db_spec['host'],
'CMSdbName' => $db_spec['database'],
'siteKey' => preg_replace(';[^a-zA-Z0-9];', '', base64_encode(random_bytes(32))),
'credKeys' => 'aes-cbc:hkdf-sha256:' . preg_replace(';[^a-zA-Z0-9];', '', base64_encode(random_bytes(32))),
'siteKey' => preg_replace(';[^a-zA-Z0-9];', '', base64_encode(random_bytes(37))),
'credKeys' => 'aes-cbc:hkdf-sha256:' . preg_replace(';[^a-zA-Z0-9];', '', base64_encode(random_bytes(37))),
'signKeys' => 'jwt-hs256:hkdf-sha256:' . preg_replace(';[^a-zA-Z0-9];', '', base64_encode(random_bytes(37))),
);
$str = file_get_contents($settingsTplFile);
foreach ($params as $key => $value) {
Expand Down

0 comments on commit 808c08c

Please sign in to comment.