Skip to content

Commit

Permalink
Merge pull request #243 from civicrm/5.35
Browse files Browse the repository at this point in the history
5.35
  • Loading branch information
totten authored Feb 21, 2021
2 parents c40aa71 + 185002d commit b9ca377
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wp-cli/civicrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private function install() {
$upload_dir = wp_upload_dir();
$settings_dir = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR;
civicrm_setup($upload_dir['basedir'] . DIRECTORY_SEPARATOR);
WP_CLI::launch("chmod 0755 $settings_dir -R");
WP_CLI::launch("chmod -R 0755 " . escapeshellarg($settings_dir));

# now we've got some files in place, require PEAR DB and check db setup
$dsn = "mysql://{$dbuser}:{$dbpass}@{$dbhost}/{$dbname}?new_link=true";
Expand Down Expand Up @@ -454,8 +454,9 @@ private function install() {
'CMSdbPass' => DB_PASSWORD,
'CMSdbHost' => DB_HOST,
'CMSdbName' => DB_NAME,
'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($tplPath . 'civicrm.settings.php.template');
Expand Down

0 comments on commit b9ca377

Please sign in to comment.