install/civicrm.php - Generate siteKey
authorTim Otten <totten@civicrm.org>
Sun, 3 May 2015 00:28:36 +0000 (17:28 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 3 May 2015 00:52:21 +0000 (17:52 -0700)
install/civicrm.php

index ec423a1938c2e4cb31618f7243d262c105ee148d..8438e850fa27c9899139fb3332b9f35e68985029 100644 (file)
@@ -235,7 +235,8 @@ function civicrm_config(&$config) {
     $params['crmRoot'] = addslashes($params['crmRoot']);
   }
 
-  $params['siteKey'] = md5(uniqid('', TRUE) . $params['baseURL']);
+  $params['siteKey'] = md5(rand() . mt_rand() . rand() . uniqid('', TRUE) . $params['baseURL']);
+  // Would prefer openssl_random_pseudo_bytes(), but I don't think it's universally available.
 
   $str = file_get_contents($tplPath . 'civicrm.settings.php.template');
   foreach ($params as $key => $value) {