|
|
@@ -288,9 +288,7 @@ class ProjectTask extends AppShell {
|
|
|
$File = new File($path . 'Config' . DS . 'core.php');
|
|
|
$contents = $File->read();
|
|
|
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
|
|
|
- if (!class_exists('Security')) {
|
|
|
- require CAKE . 'Utility' . DS . 'security.php';
|
|
|
- }
|
|
|
+ App::uses('Security', 'Utility');
|
|
|
$string = substr(bin2hex(Security::generateAuthKey()), 0, 30);
|
|
|
$result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents);
|
|
|
if ($File->write($result)) {
|