diff --git a/app/config/core.php b/app/config/core.php index c127be2d1..a4dea4cdd 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -200,7 +200,7 @@ /** * A random numeric string (digits only) used to encrypt/decrypt strings. */ - Configure::write('Security.cipher_seed', '76859309657453542496749683645'); + Configure::write('Security.cipherSeed', '76859309657453542496749683645'); /** * Apply timestamps with the last modified time to static assets (js, css, images). diff --git a/cake/console/templates/skel/config/core.php b/cake/console/templates/skel/config/core.php index 15ec7aec3..38c82319c 100644 --- a/cake/console/templates/skel/config/core.php +++ b/cake/console/templates/skel/config/core.php @@ -209,7 +209,7 @@ /** * A random numeric string (digits only) used to encrypt/decrypt strings. */ - Configure::write('Security.cipher_seed', '76859309657453542496749683645'); + Configure::write('Security.cipherSeed', '76859309657453542496749683645'); /** * Compress CSS output by removing comments, whitespace, repeating tags, etc. diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index ff01586cc..e0cefc703 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -674,8 +674,8 @@ class Debugger extends Object { trigger_error(__('Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application', true), E_USER_NOTICE); } - if (Configure::read('Security.cipher_seed') == '76859309657453542496749683645') { - trigger_error(__('Please change the value of \'Security.cipher_seed\' in app/config/core.php to a numeric (digits only) seed value specific to your application', true), E_USER_NOTICE); + if (Configure::read('Security.cipherSeed') == '76859309657453542496749683645') { + trigger_error(__('Please change the value of \'Security.cipherSeed\' in app/config/core.php to a numeric (digits only) seed value specific to your application', true), E_USER_NOTICE); } } diff --git a/cake/libs/security.php b/cake/libs/security.php index 5bfc387bf..e9d5c7f94 100644 --- a/cake/libs/security.php +++ b/cake/libs/security.php @@ -174,7 +174,7 @@ class Security extends Object { return ''; } - srand(Configure::read('Security.cipher_seed')); + srand(Configure::read('Security.cipherSeed')); $out = ''; for ($i = 0; $i < strlen($text); $i++) { @@ -184,6 +184,8 @@ class Security extends Object { $mask = rand(0, 255); $out .= chr(ord(substr($text, $i, 1)) ^ $mask); } + + srand(); return $out; } }